News for hackers. Stuff that matters.
Re:Stimulation Clicker by xnx on Monday January 06, 2025 @12:20PM (#42612611)
Fantastic encapsulation and commentary on the modern web and attentionspace.

There's certainly better ways to do this, but here's one way to automate 1000 clicks from the console:

  for (let i = 0; i < 1000; i++) {
    document.querySelector('button.main-btn-pretty').click();
  }
Automating this art piece probably also says ... something.
Re:Stimulation Clicker by mkoryak on Monday January 06, 2025 @04:16PM (#42615953)
To everyone who is doing this:

The only person you are cheating is yourself!!!

Re:Stimulation Clicker by taberiand on Monday January 06, 2025 @08:54PM (#42618341)
Short-circuiting a clicker game (and all other forms of nullifying Skinner boxes) is self-care.
Re:Stimulation Clicker by cainxinth on Monday January 06, 2025 @01:34PM (#42613644)
> Fantastic encapsulation and commentary on the modern web and attentionspace.

This is why I quit Hearthstone even though I never spent a dime on it. I realized I had been habituated into playing it every day. I started feeling like a lab rat trained to push a button for a reward.

Re:Stimulation Clicker by herghost on Monday January 06, 2025 @02:42PM (#42614669)
Cookie Clicker taught me this about Destiny and Destiny 2 as well.

I got a lot of enjoyment out of those games - and they were partly the backdrop to socialising online with IRL friends who didn't live close to me - but at some point the absurdity of them became too obvious and we stopped.

"moved on" - to Call of Duty.

Re:Stimulation Clicker by xnx on Monday January 06, 2025 @01:48PM (#42613836)
That's one of the things that makes Stimulation Clicker so good, by being exposed to the most extreme version, it helps you identify other engineered attention grabbers in everyday life.
Re:Stimulation Clicker by 3np on Monday January 06, 2025 @03:50PM (#42615617)
> most extreme version

Well...

http://ivark.github.io/

Re:Stimulation Clicker by skyyler on Tuesday January 07, 2025 @03:56PM (#42627364)
I found this link on here like six months ago and my life hasn't been the same since.
Re:Stimulation Clicker by pests on Monday January 06, 2025 @02:26PM (#42614434)
> I realized I had been habituated into playing it every day

So like a hobby?

Did you have fun playing it?

Re:Stimulation Clicker by latexr on Monday January 06, 2025 @04:18PM (#42615978)
A hobby is something you’re supposed to do for fun, not out of habit.
Re:Stimulation Clicker by lelandfe on Monday January 06, 2025 @03:33PM (#42615389)
Seems more a routine than hobby, I'd say.
Re:Stimulation Clicker by WD-42 on Monday January 06, 2025 @05:01PM (#42616462)
It’s when you feel guilt or fomo for not playing every day that it becomes a problem. Many games like this.
Re:Stimulation Clicker by malux85 on Monday January 06, 2025 @01:41PM (#42613753)
Hahaha yeah! Me too! Good thing I escaped that!

Now back to my coding job, I really have to focus and push enough of these buttons or I’ll get fired and won’t get my pay

Re:Stimulation Clicker by 01HNNWZ0MV43FF on Monday January 06, 2025 @03:34PM (#42615405)
Least we're getting paid for those buttons
Re:Stimulation Clicker by praptak on Monday January 06, 2025 @03:18PM (#42615199)
...now back to my hourly check of HN frontpage. Gotta be diligent and keep up with the industry news.
Re:Stimulation Clicker by wiseowise on Tuesday January 07, 2025 @04:59PM (#42628141)
Are you me?
Re:Stimulation Clicker by mtremsal on Tuesday January 07, 2025 @03:51AM (#42620610)
> This is why I quit Hearthstone even though I never spent a dime on it.

Good news, you now have time to pick up The Bazaar instead! (joke aside, it's quite fun, a lot more chill, and not nearly as exploitative as Hearthstone)

Re:Stimulation Clicker by inglor on Monday January 06, 2025 @03:15PM (#42615151)
Automate that bitcoin!

```

setInterval(() => { let max = 100; while(max-->0) { let price = +document.querySelector(".last-price").textContent.trim().slice(1).replace(",","").split("\n")[0]; if (price > 20000) { document.querySelector(".stock-sell").click(); } else if (price < 10000) { document.querySelector(".stock-buy").click(); } else { break; } } })

```

Re:Stimulation Clicker by jetbalsa on Monday January 06, 2025 @12:30PM (#42612741)
a fun way is to resize the window to be super tiny and the DVD Bounce really gets going into the millions
Re:Stimulation Clicker by xnx on Monday January 06, 2025 @12:40PM (#42612847)
Good one. Sounds like a geiger counter.
Re:Stimulation Clicker by Imustaskforhelp on Monday January 06, 2025 @01:08PM (#42613259)
woah! great job
Re:Stimulation Clicker by ipsum2 on Monday January 06, 2025 @01:47PM (#42613824)
Running it async will prevent the main screen from lagging:

  (async () => {
    const delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));
    for (let i = 0; i < 10000; i++) {
        document.getElementsByClassName('main-btn')[0].click();
        await delay(5); // 5 ms sleep
    }
  })();
Re:Stimulation Clicker by hombre_fatal on Monday January 06, 2025 @01:54PM (#42613942)
If you're already using setTimeout, why not just use it directly?

    function clickLoop() {
        document.querySelector('.main-btn').click(); 
        setTimeout(clickLoop, 50) 
    }
Re:Stimulation Clicker by eterm on Monday January 06, 2025 @03:04PM (#42614995)
What's all this overengineering and waste creating timeouts?

Why not just use setInterval?

    let interval = setInterval(() => document.querySelector('.main-btn').click(), 50) 
Then

    clearInterval(interval)
to stop
Re:Stimulation Clicker by hombre_fatal on Monday January 06, 2025 @06:13PM (#42617198)
How could you be so wasteful traversing the DOM tree every time to find .main-btn? Shame on you.
Re:Stimulation Clicker by jampekka on Monday January 06, 2025 @02:19PM (#42614329)
That's an infinite loop.
Re:Stimulation Clicker by akx on Monday January 06, 2025 @02:45PM (#42614729)
Breakable by `clickLoop = null`.
Re:Stimulation Clicker by phelipetls on Monday January 06, 2025 @05:15PM (#42616607)
Or use requestAnimationFrame to run infinitely at ~60fps

    window.requestAnimationFrame(function clickButton() {
        document.querySelector(".main-btn").click()
        window.requestAnimationFrame(clickButton)
    })
Re:Stimulation Clicker by 65 on Monday January 06, 2025 @07:09PM (#42617662)
This doesn't seem to logarithmically scale when you get the click percent increase upgrade, while the other code does.
Re:Stimulation Clicker by i8i76876 on Thursday January 09, 2025 @08:29AM (#42645202)
7i67i76i76i76i798778kiki87778uuuuuuuujjjjjjjkkkkkkkk
Re:Stimulation Clicker by zemo on Monday January 06, 2025 @03:51PM (#42615631)
> Automating this art piece probably also says ... something.

if you do that you're not really experiencing it

Re:Stimulation Clicker by declan_roberts on Monday January 06, 2025 @03:31PM (#42615360)
Automating it is the most fun part of these silly games. Here's a bash script to do it on mac (brew install clickclick first)

    while true; do
        cliclick c:.
    done
Re:Stimulation Clicker by yu3zhou4 on Monday January 06, 2025 @01:33PM (#42613619)
Infinite version:

let button = document.getElementsByClassName('main-btn');

let clicker = setInterval(() => button[0].click(), 1);

To stop, use this:

window.clearInterval(clicker);

Re:Stimulation Clicker by kmoser on Monday January 06, 2025 @01:52PM (#42613915)
You could shorten it by using $('.main-btn').click()
Re:Stimulation Clicker by narrator on Monday January 06, 2025 @05:29PM (#42616762)
Just go into developer mode and just break on a line like so:

    r.sps && r.purchased && this.addStimulation(r.sps \* n, r.id)
and run

     this.addStimulation(10000000000,r.id)
and resume.
Re:Stimulation Clicker by karpatic on Monday January 06, 2025 @09:48PM (#42618623)
I did the same exact thing and then wanted to post it into the groupchat then see this.

1000 iterations too!

Why are we like this XD