您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Loops accounts: login -> go to My Links -> click Export -> back to login. Adds pauses between each action.
当前为
// ==UserScript== // @name SecureMyPass Multi-Login + Export (bare bones, with pauses) // @namespace local.securemypass.simple // @version 1.0.0 // @description Loops accounts: login -> go to My Links -> click Export -> back to login. Adds pauses between each action. // @match https://securemypass.com/* // @run-at document-idle // @grant none // ==/UserScript== (function () { 'use strict'; // ---- CONFIG (edit if needed) ---- const LOGIN_URL = 'https://securemypass.com/login'; const LINKS_URL = 'https://securemypass.com/my-links'; const DELAY_MS = 1200; // pause between each action (ms). Increase if site is slow. // ---- Simple helpers ---- const sleep = (ms) => new Promise(r => setTimeout(r, ms)); async function waitForXPath(xpath, timeoutMs = 15000) { const start = Date.now(); while (Date.now() - start < timeoutMs) { const el = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue; if (el) return el; await sleep(150); } throw new Error('Timeout waiting for XPath: ' + xpath); } async function typeByXPath(xpath, text) { const el = await waitForXPath(xpath); el.focus(); await sleep(50); el.value = ''; await sleep(50); el.dispatchEvent(new Event('input', { bubbles: true })); await sleep(50); el.value = text; el.dispatchEvent(new Event('input', { bubbles: true })); await sleep(DELAY_MS); } async function clickByXPath(xpath) { const el = await waitForXPath(xpath); el.click(); await sleep(DELAY_MS); } // ---- Main flow per account ---- async function runForAccount({ username, password }) { // Ensure we’re on the login page if (!location.href.startsWith(LOGIN_URL)) { location.href = LOGIN_URL; await sleep(DELAY_MS + 1200); } // Step 1: Enter Username await typeByXPath('//*[@id="loginUsername"]', username); // Step 2: Click Enter (button) await clickByXPath('//*[@id="root"]/div[1]/main/div/div/div/div/div[1]/div/form/div[2]/button'); // Step 3: Enter Password await typeByXPath('//*[@id="loginPassword"]', password); // Step 4: Click Enter (button) await clickByXPath('//*[@id="root"]/div[1]/main/div/div/div/div/div[1]/div/form/div[2]/button'); // Step 5: Go to My Links location.href = LINKS_URL; await sleep(DELAY_MS + 1500); // Step 6: Click Export button await clickByXPath('//*[@id=":r3s:"]'); // Optional: small pause to allow download to start await sleep(DELAY_MS + 1000); // Step 7: Go back to login for next account (simple approach) location.href = LOGIN_URL; await sleep(DELAY_MS + 1200); } // ---- Simple “UI” via prompts (bare bones) ---- async function init() { // Only run once per full load if (window.__SMP_MULTI_EXPORT_RUNNING__) return; window.__SMP_MULTI_EXPORT_RUNNING__ = true; const nStr = prompt('Number of accounts to process?'); if (!nStr) return; const n = Math.max(0, parseInt(nStr, 10) || 0); if (n <= 0) return; const accounts = []; for (let i = 0; i < n; i++) { const user = prompt(`Username for account #${i + 1}:`); if (user === null) return; // cancel const pass = prompt(`Password for account #${i + 1}:`); if (pass === null) return; // cancel accounts.push({ username: user.trim(), password: pass }); } // Run sequentially with pauses for (let i = 0; i < accounts.length; i++) { console.log(`[SMP] Starting account ${i + 1}/${accounts.length}: ${accounts[i].username}`); try { await runForAccount(accounts[i]); console.log(`[SMP] Finished account ${i + 1}`); await sleep(DELAY_MS + 800); } catch (err) { console.error(`[SMP] Error on account ${i + 1}:`, err); // proceed to next } } console.log('[SMP] All done.'); window.__SMP_MULTI_EXPORT_RUNNING__ = false; } // Kick off after idle setTimeout(init, 800); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址