I am getting the plain text of outlook calendar events and converting them to an ics for download with Tampermonkey. The button worked when I wrote this a couple of years ago, but now it is not. I am not sure if I need to grant permissions now or if something else broke it. The button is added just fine,
Tag: userscripts
Using Javascript, refresh a page every 30 seconds UNLESS a phrase appears
Existing code I use the following code in ViolentMonkey (or GreaseKit or TamperMonkey) to refresh a page every 30 seconds: Can I make it stop? This has been working fine for many years. But now, I want my code to NOT refresh the page if the following phrase is present: Important shizzle (The reason I don’t want it to refresh
ReferenceError: jsPDF is not defined (with access to the package)
I made a userscript for Google where I click “Do something”, it prints out the webpage, in a PDF. However, when I click on it, it gives an error: ReferenceError: jsPDF is not defined. I have the jspdf file located with: Can you explain why it is raising this error? Code: Answer When you wrote: you are using the grave
How can I spoof my userAgent using a userscript?
I’m trying to visit a website but its not allowing me to do so because it doesn’t support my browser. I believe it is detecting my browser through userAgent detection. So I wanted to create a userScript that would modify my userAgent so that the website wouldn’t be able to detect my browser. I tried: Even though it shows for
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.
Userscript works only on pages served from backend, but not on frontend in a SPA way
I have the following userscript I run on Greasemonkey/Tampermonkey. I run it on facebook.com which serves some of the webpages from backend, in bootstrapping, and some others on the fly, in front-end, via HRO, just as a Single Page Application (SPA) would. If I run this script on console, even in HRO based webpages, it runs fine, but when runned
Unbind .onselectstart return false
I am trying to write a userscript that will remove the effects of onselectstart from an id on a page. So far I am assuming that I can rebind the original function using something like this: JSFiddle Any ideas would be appreciated. Answer Looks like I managed to work out the answer. Thank you LightStyle for giving me the hints.
How can I run a Greasemonkey script when page changed via ajax?
I have that script: It works fine but it works only main page load. I want to run this when page changed via ajax. How can I do that? Also please give examples with your answers. I’m newbie. I don’t know how to use things in your answers. Answer Since browser’s environment is event-driven you’ll have to either set up
How to convert a bookmarklet into a Greasemonkey userscript?
Is there a easy way to do this. And is there anything that needs to be changed due to differences in how it is ran? Answer The easiest way to do this: Run the bookmarklet code through a URL decoder. so that javascript:alert%20(‘Hi%20Boss!’)%3B, for example, becomes: javascript:alert (‘Hi Boss!’); Strip the leading javascript: off. Result: alert (‘Hi Boss!’); Add