Hacker News new | past | comments | ask | show | jobs | submit login

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!




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


I get a reference error when I try this (chrome stable on linux)


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



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.


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


Was closed as "Infeasible", i.e. wontfix.


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


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.


going to the ocean is the end, I got there with only a couple dozen million stim


My brain has never been happier to see a credits screen


Nah, just remove the element and keep going.


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


Ah, a new yardstick for browser performance :-P


Sir that's true evil! That's evil you know?


Majestic.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: