paste in "setInterval(() => document.querySelector('.main-btn').click(), 20)" into the browser console, clicks 50x per second for you :)
paste in "setInterval(() => document.querySelector('.main-btn').click(), 20)" into the browser console, clicks 50x per second for you :)
What a ride. Love the implied commentary on our over-stimulated lives!
setInterval(()=>$('.main-btn')?.click(), 0)
setInterval(()=>$$('.upgrade')?.forEach(_=>_.click()), 1000)
to create the simplest dependency-free cheat speed runner. (And, as mentioned earlier, shrinking -- or logically also zooming in -- the page results in more DVD bounces.)[0] https://devtoolstips.org/tips/en/query-dom-from-console/ [1] https://firefox-source-docs.mozilla.org/devtools-user/web_co... [2] https://developer.chrome.com/docs/devtools/console/utilities... [3] https://learn.microsoft.com/en-us/microsoft-edge/devtools-gu... [4] https://developer.apple.com/library/archive/documentation/Ap...
console.log(Object.getOwnPropertyDescriptor(globalThis, '$'))
// {writable: true, enumerable: true, configurable: true, value: f}
globalThis.globalThat = globalThis
globalThat.$ === globalThis.$
// true
setTimeout(()=>console.log(globalThis.globalThat === globalThis))
// true
setTimeout(()=>console.log(Object.getOwnPropertyDescriptor(globalThis, '$')))
// undefined (!)
$ = $
setTimeout(()=>console.log(Object.getOwnPropertyDescriptor(globalThis, '$')))
// { writable: true, enumerable: true, configurable: true, value: f}
And it (`setTimeout(()=>{console.log(typeof $==="function")},0)`) works in Firefox. (Interestingly, you cannot get $'s descriptor in there, but you have it always available in timeout.)In Chrome and Firefox, $ and $$ are available in the console as replacements for document.querySelector and document.querySelectorAll, respectively.
This doesn't work in scripts though; only in the console. In a script you can use this:
const $ = document.querySelector.bind(document);332,446,225,163,762,970,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 stimulation
131,903,042,042,866,960,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000 stimulation per second
And there doesn't seem to be an end in sight.
const lastPriceElement = document.querySelector('.last-price'); const buyButton = document.querySelector('.stock-btn.stock-buy'); const sellButton = document.querySelector('.stock-btn.stock-sell');
const buyPrice = 280; const sellPrice = 320;
function checkPriceAndTrade() {
if (lastPriceElement && buyButton && sellButton) {
// Get the price text and convert to number
const priceText = lastPriceElement.firstChild.textContent.trim();
const price = Number(priceText.replace(/[$,]/g, ''));
// Execute trade based on price
if (price < buyPrice) {
console.log(`Price ${price} is below $` + buyPrice ` - Executing buy`);
buyButton.click();
} else if (price > sellPrice) {
console.log(`Price ${price} is above $` + sellPrice ` - Executing sell`);
sellButton.click();
} else {
console.log(`Price ${price} is between thresholds - No action taken`);
}
}
}// Run the check every 20 milliseconds setInterval(checkPriceAndTrade, 20);