Last active
January 14, 2025 04:26
-
-
Save guoyunhe/60932677edeba139c0c0c245dc435fb8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Goofish Clicks | |
// @namespace http://tampermonkey.net/ | |
// @version 2024-09-15 | |
// @description try to take over the world! | |
// @author You | |
// @match https://*.goofish.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=www.goofish.com | |
// @grant none | |
// ==/UserScript== | |
(async function() { | |
'use strict'; | |
function open(url, id) { | |
return new Promise((resolve, reject) => { | |
const handle = window.open(url, id); | |
const interval = setInterval(() => { | |
if (handle.closed) { | |
clearInterval(interval); | |
resolve(null); | |
} | |
}, 100); | |
}); | |
} | |
if (location.host === 'h5.m.goofish.com') { | |
setTimeout(() => window.close(), 500); | |
} else { | |
const button = document.createElement('button'); | |
button.style.position = 'fixed'; | |
button.style.top = '50%'; | |
button.style.left = '50%'; | |
button.style.width = '200px'; | |
button.style.marginLeft = '-100px'; | |
button.style.height = '80px'; | |
button.style.marginTop = '-40px'; | |
button.style.fontSize = '32px'; | |
button.style.background = 'red'; | |
button.style.color = 'white'; | |
button.style.zIndex = '9999' | |
button.textContent = 'Click Me!'; | |
document.body.append(button); | |
button.onclick = async () => { | |
let count = 0; | |
while (true) { | |
console.log(count++); | |
const ids = Array.from(document.querySelectorAll('a[href^="https://www.goofish.com/item"]')).map((a, i) => { | |
if (a.href) { | |
const id = new URL(a.href).searchParams.get('id'); | |
return id; | |
} | |
}); | |
while (true) { | |
const url = `https://h5.m.goofish.com/wow/moyu/moyu-project/cro-report-center/pages/report-form?titleVisible=false&useCusFont=true&pageSourceCode=itemDetail&reportSubjectTypeCode=ITEM&reportSubjectId=874993506419&reportTypeCode=LANFA_COMMODITY&formId=OTHER_ITEM`; | |
await open(url); | |
} | |
} | |
}; | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment