Search code examples
javascriptfirefoxgreasemonkey

How to to load a URL at specific time intervals in a Greasemonkey script?


How do I load a specified URL in Greasemonkey, every 15 minutes? The problem is that a page redirects me to another URL. I want to automatically return to my specified URL every 15 minutes.


Solution

  • I found the answer, just use the following script in greasemonkey,

    window.setTimeout(main,10000);
    
    function main()
    {
      window.location.replace("http://google.com");
    }