News for hackers. Stuff that matters.
Re:Stimulation Clicker by 383toast on Monday January 06, 2025 @06:41PM (#42617447)
for people that don't want to click a lot,

paste in "setInterval(() => document.querySelector('.main-btn').click(), 20)" into the browser console, clicks 50x per second for you :)

Re:Stimulation Clicker by ccvannorman on Monday January 06, 2025 @08:55PM (#42618347)
Speed-ran the game using this (well, I injected jquery first to select the element using $() because I'm an absolute Baboon) in about 45 seconds, spam clicking all the upgrades, and clicks stopped going up after hitting "342,044,125,797,992,850,000,000,000,000 stimulation" with 10k clicks per second.

What a ride. Love the implied commentary on our over-stimulated lives!

Re:Stimulation Clicker by stanmancan on Monday January 06, 2025 @11:23PM (#42619207)
I wonder what the limiting factor is here; I'm currently at

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.

Re:Stimulation Clicker by lightedman on Tuesday January 07, 2025 @01:04AM (#42619761)
going to the ocean is the end, I got there with only a couple dozen million stim
Re:Stimulation Clicker by SamSkjord on Tuesday January 07, 2025 @08:35AM (#42622131)
My brain has never been happier to see a credits screen
Re:Stimulation Clicker by mgrpowers on Tuesday January 07, 2025 @07:35PM (#42629533)
Nah, just remove the element and keep going.
Re:Stimulation Clicker by anais9 on Monday January 06, 2025 @10:16PM (#42618788)
I envy your rig - mine glitched a lot to get it in <3min. Might not be doing myself a service by actually answering the Duolingo questions via LLM... https://www.youtube.com/watch?v=I-J0ppP-H9s
Re:Stimulation Clicker by rkagerer on Tuesday January 07, 2025 @12:31AM (#42619565)
Ah, a new yardstick for browser performance :-P
Re:Stimulation Clicker by p0w3n3d on Tuesday January 07, 2025 @04:09PM (#42627493)
Sir that's true evil! That's evil you know?
Re:Stimulation Clicker by emberfiend on Wednesday January 08, 2025 @04:16AM (#42632423)
Majestic.
Re:Stimulation Clicker by bambax on Tuesday January 07, 2025 @04:34AM (#42620845)
> I injected jquery first to select the element using $()

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);
Re:Stimulation Clicker by myfonj on Tuesday January 07, 2025 @04:56AM (#42620973)
Fun fact: browsers' devtools consoles have de-facto standardized convenience aliases for querying the DOM, similar to jQuery [0][1][2][3][4]. This means you could do something as simple as:

    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...

Re:Stimulation Clicker by r14n on Tuesday January 07, 2025 @10:15AM (#42623207)
I get a reference error when I try this (chrome stable on linux)
Re:Stimulation Clicker by myfonj on Tuesday January 07, 2025 @10:49AM (#42623661)
Ah, thanks for the heads-up, apparently there is something borked in Chromium wrt $ / $$ encapsulation, as it seems they are nor reachable from the (global) context setInterval so doing `window.$ = $; window.$$ = $$;` fixes that in Chrome. Not sure why. (Yet again embarrassed myself by trying a snippet that "simply must work ® according all documentations ™" in single a browser only before posting. Sigh.)
Re:Stimulation Clicker by myfonj on Wednesday January 08, 2025 @07:46AM (#42633597)
Re:Stimulation Clicker by throwaway127482 on Wednesday January 08, 2025 @07:18PM (#42640135)
I bet it's working as intended. The $ symbol is probably a special feature of the console and is not intended to be a property of window. Inside setInterval, the function is no longer being executed in the special console environment, which has access to that symbol.
Re:Stimulation Clicker by myfonj on Wednesday January 08, 2025 @08:01PM (#42640414)
Yes, I guess there could be some intention behind that, presumably some security precautions, but still: the fact that you can see $ in the globalThis (as a non-enumerable prop), and that globalThis you see from inside the timeout-ed function is strictly equal to globalThis seen directly from the console, that makes it somewhat spooky.

    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.)
Re:Stimulation Clicker by myfonj on Monday January 13, 2025 @05:45AM (#42682087)
Was closed as "Infeasible", i.e. wontfix.
Re:Stimulation Clicker by d6e on Tuesday January 07, 2025 @01:35AM (#42619911)
The real answer to the web 2.0 appified social media hell hole is automation :D
Re:Stimulation Clicker by UltraSane on Tuesday January 07, 2025 @04:22AM (#42620773)
If you shrink the window down as small as possible the DVD logos collide super fast and earn a ton of stimulation.
Re:Stimulation Clicker by qiine on Tuesday January 07, 2025 @12:59PM (#42625269)
ah ! clever
Re:Stimulation Clicker by mjmsmith on Tuesday January 07, 2025 @09:30PM (#42630251)
In Safari, show the Web Inspector and then shrink the window so that the inspector takes up all of the space.
Re:Stimulation Clicker by kinderjaje on Tuesday January 07, 2025 @04:04PM (#42627439)
thanks, u saved me few clicks ^^
Re:Stimulation Clicker by JamesBarney on Wednesday January 08, 2025 @01:41AM (#42631649)
Or for people who want to make money as a trader.

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);