Live data from Hacker News

Checkbox Olympics

checkboxolympics.com

21–30 of 51 posts

Re: Checkbox Olympics

#22
post #4

When done, don't forget to click the "back" arrow in the upper left corner. There is another checkbox event (hurdles...) In a weird way this reminds me of the old 80s "epyx" sports game which seemed to involve typeing keys as fast as you can. https://en.wikipedia.org/wiki/Summer_Games_(video_game)

I remember playing a version of this on the (386?) PC. Bashing the various keys did not go down well with my dad.

https://www.freegameempire.com/games/Summer-Games

Re: Checkbox Olympics

#25

     $('.readyButton').click(); setTimeout(()=> [...document.querySelectorAll('input[type="checkbox"]')].map(cb => cb.click()), 3000)

This gives me 0.143 in Safari which is just a proof that DOM is freaking slow haha!

Re: Checkbox Olympics

#26
On my tablet the slightes movement of the pen causes firefox to select stuff instead of switching the checkbox. Causes extreme slow-down.

Under normal circumstances I don't like websites to try to mess with selection, copynpaste, ... but in this case it would be both helpful and justified.

Re: Checkbox Olympics

#27
post #25

$('.readyButton').click(); setTimeout(()=> [...document.querySelectorAll('input[type="checkbox"]')].map(cb => cb.click()), 3000) This gives me 0.143 in Safari which is just a proof that DOM is freaking slow haha!

Wow in Chrome 102.0.5005.115 (Official Build) (arm64) it gives me 3.273s which proves that point even more

Re: Checkbox Olympics

#28
post #6

My "speedrun": var simulateClick = function (elem) { // Create our event (with options) var evt = new MouseEvent('click', { bubbles: true, cancelable: true, view: window }); // If cancelled, don't dispatch our event var canceled = !elem.dispatchEvent(evt); }; var run = () => { var el = document.querySelector('input[type=checkbox]:not(:checked)') simulateClick(el) } setInterval(run, 100)

Brute approach (This doesn't account for whether a checkbox is checked or not so I don't actually know if the game prevents everything getting checked programmatically all at once. I had to set the setTimeout to "2" instead of "1" so it would actually record some time!):

  document.querySelector('.readyButton').click();
  waitForStart();

  function waitForStart() {
    if (document.querySelector('.setGo').classList.value.includes("going")) { 
      for(x=0; x

Re: Checkbox Olympics

#29
Kind of like minesweeper, but without the strategy part?

Because once a minesweeper addict has reached a certain base level of skill, the strategy part stops to be about where the mines are, it becomes all about reordering the click queue for speed. (don't ask me how I know)

Re: Checkbox Olympics

#30
post #25

$('.readyButton').click(); setTimeout(()=> [...document.querySelectorAll('input[type="checkbox"]')].map(cb => cb.click()), 3000) This gives me 0.143 in Safari which is just a proof that DOM is freaking slow haha!

Wow in Chrome 102.0.5005.115 (Official Build) (arm64) it gives me 3.273s which proves that point even more

Hopefully you forgot to exclude 3sec timeout from that
Post reply on HN