Trying to remove some characters from a string via JavaScript

I have a script where it parses a SVG image. I’m trying to parse a attribute named “opacity” and remove the period and zero than add a zero if it equals “0.8” for a example. The number 8 could be any …

settimeout not working properly when i tried to use it to refresh a page

The purpose of this code is to refresh a page after either a wait time of 1 second or 5 seconds depending on a random variable. However, the code below makes it so that it either refreshes after a wait time of 1 second EVERY SINGLE TIME, or it refreshes after a wait time of 5 seconds EVERY SINGLE TIME. How do I make it so that the refresh wait time are EITHER 1 second OR 5 seconds on every refresh? Answer The issue is that while you are pointing the iframe to the current document, the document that contains

Develop Tampermonkey scripts in a real IDE with automatic deployment to OpenUserJs repo

I recently started development on a Tampermonkey script, which is hosted on OpenUserJs. It seems that I’m going to invest a bit more time in the future on this script by keep it up to date and extend …

Tampermonkey .click() not working

I’m trying to auto click a button in tampermonkey, but for some reason the code isn’t executing. Though, if I put the code in console and run it, it works fine. Here it is: $(document).ready(…

Automatically check a checkbox with a userscript?

Some sites (namely Steam Community Market) require the user to manually check a specific checkbox for repetitive actions like buying items. I’d like to have that checkbox always checked. URL: http://…