R hotkey is sometimes broken
On some sites (not all), when I press the R key to disable the script, it stays active and the image keeps getting resized, no matter how many times I press R.
Example: https://rule34.xxx/index.php?page=post&s=view&id=7728062
Chrome 133.0.6943.59
Works fine for me in Chrome, check your other extensions and userscripts and then the browser console for messages
Okay apparently I was still on v2023.08.29, and auto updates were disabled for some reason... My bad!
Okay so the bug is definitely still present, although it's very random. I haven't figured out how to steadily reproduce it, it just comes and goes. Happens even with all other extensions and other scripts disabled. Since I was using a really old version of Handy Image, and this began recently, I assume it's something with Chrome or Tampermonkey.
When it happens, even if I select "Re-Load page normally" in the TM menu, it stills resizes the reloaded page and "Re-Load page normally" stays in the menu, as if it doesn't remember that I just used that option. When the bug appears, if I try opening the F12 console, then pressing R, the bug disappears and it reloads correctly...
It uses sessionStorage cookie to prevent itself from resizing the image, might be your other extensions or scripts cleaning it up
As mentioned, I tried disabling every extension other than Tampermonkey and any other applicable scripts, but it still occurs sometimes. I haven't touched any cookie-related browser settings either. Probably a Chrome bug I guess?
I have tried opening 10+ tabs in chrome and using R in all of them - all worked fine
Yeah it's really random, might work fine for 10 minutes then it starts happening all of a sudden, then it might fix itself after a minute, or keep going forever until Chrome is restarted. At least now I can temporarily fix it by pressing R while the F12 console is open. I strongly suspect a Chrome bug.
That's the website doing it itself with javascript - it's clearing sessionstorage used to store the script's mark "don't run the script"
The easiest fix for you would be to turn off JavaScript for that specific website (no functionality would be lost it seems), you can do that if you have Chrome
, or with a noscript extension in firefox
sankakucomplex also uses JavaScript to block adblocking and redirect you, so blocking it there is also a good idea.
I think what's happening is that HandyImage kills their getPrevNext() mid-execution by deleting its <script> tag from the page, preventing it from writing the lastRefresh key after clearing storage, thus causing their script to re-clear storage when pressing R because of their isNaN check.
A fix that seems to work for me:
case "rule34.xxx":
sessionStorage.setItem("lastRefresh", Date.now());
case "rule34.us":
This tricks their script into avoiding storage clearing. It's not ideal, but it's better than turning off JS (which breaks many site features like commenting and adding to favorites)
Ok, added your fix