您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Copy "password: ###" from ovagames pages
// ==UserScript== // @name Copy Password from Ovagames // @namespace http://tampermonkey.net/ // @version 1.4 // @description Copy "password: ###" from ovagames pages // @author Starbez // @license MIT // @match https://www.ovagames.com/*.html // @grant GM_setClipboard // ==/UserScript== (function() { 'use strict'; console.log('Tampermonkey script loaded.'); // Function to create and show a notification function showNotification(message) { const notification = document.createElement('div'); notification.innerText = message; notification.style.position = 'fixed'; notification.style.bottom = '10px'; notification.style.right = '10px'; notification.style.padding = '10px'; notification.style.backgroundColor = '#28a745'; notification.style.color = 'white'; notification.style.fontSize = '16px'; notification.style.borderRadius = '5px'; notification.style.boxShadow = '0 0 10px rgba(0, 0, 0, 0.5)'; notification.style.zIndex = '10000'; document.body.appendChild(notification); setTimeout(() => { notification.remove(); }, 3000); // Remove the notification after 3 seconds } // Function to find and copy the password function copyPassword() { console.log('Page loaded. Looking for password in #link_download...'); // Look for the element with ID 'link_download' const downloadElement = document.getElementById('link_download'); if (downloadElement) { console.log('#link_download element found:', downloadElement); // Look for the specific pattern "password: ###" within the element const passwordPattern = /\d{3}/i; const elementText = downloadElement.innerText; console.log('Element text content:', elementText); const passwordText = elementText.match(passwordPattern); console.log('Matched password:', passwordText); if (passwordText) { // Copy the password to the clipboard GM_setClipboard(passwordText[0], 'text'); showNotification('Password copied to clipboard: ' + passwordText[0]); } else { console.log('Password not found in #link_download.'); } } else { console.log('#link_download element not found.'); } } // Wait for the page to load window.addEventListener('load', copyPassword); })();