Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8495925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:42:40+00:00 2026-06-10T23:42:40+00:00

I’ve got a Greasemonkey script (written by another coder – Brock Adams) that loads

  • 0

I’ve got a Greasemonkey script (written by another coder – Brock Adams) that loads sequentially the pages contained in the array at the beginning of the code.
How to open a list of pages automatically and sequentially?

   // ==UserScript==
// @name        Multipage, MultiSite slideshow of sorts
// @include     http://google.com/*
// @include     http://site2/*
// @include     http://site3/*
// @include     http://site4/*
// @grant       GM_addStyle
// ==/UserScript==
/*- The @grant directive is needed to work around a major design
    change introduced in GM 1.0.
    It restores the sandbox.
*/

var urlsToLoad  = [
    'http://google.com/'
    , 'http://site2/somepage/'
    , 'http://site3/somepage/'
    , 'http://site4/somepage/'
];

/*--- Since many of these sites load large pictures, Chrome's and 
    Firefox's injection may fire a good deal before the image(s) 
    finish loading.
    So, insure script fires after load:
*/
window.addEventListener ("load", FireTimer, false);
if (document.readyState == "complete") {
    FireTimer ();
}
//--- Catch new pages loaded by WELL BEHAVED ajax.
window.addEventListener ("hashchange", FireTimer,  false);

function FireTimer () {
    setTimeout (GotoNextURL, 5000); // 5000 == 5 seconds
}

function GotoNextURL () {
    var numUrls     = urlsToLoad.length;
    var urlIdx      = urlsToLoad.indexOf (location.href);
    urlIdx++;
    if (urlIdx >= numUrls)
        urlIdx = 0;

    location.href   = urlsToLoad[urlIdx];
}

The problem comes when I have 2 pages of the same website to be loaded sequentially: the script stops working because the website uses AJAX in order to have a faster loading of its pages.

How can I force this script to fully reload pages?

As you can see he already tried:

//--- Catch new pages loaded by WELL BEHAVED ajax. 
window.addEventListener ("hashchange", FireTimer,  false);

to solve this issue, but it doesn’t work as expected.

In particular the site that gives me this issue is ink361.com.
I’ve created a jsFiddle of an example of his source: http://jsfiddle.net/XjjfK/

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T23:42:41+00:00Added an answer on June 10, 2026 at 11:42 pm

    I can’t login, but the script worked perfectly for me.
    I installed the script exactly as below, and it cycled between those 3 ink361.com pages, just as expected.

    Some things for you to do/check:

    1. Are you using your other script (or ANY other GM script) on the same pages?

    2. When you are browsing ink361.com, what does the Greasemonkey menu show?
      GM menu
      GM menu results

    3. It sounds like the installed script doesn’t have the hashchange code — which should work on that site, since it does update the hashtags.

      1. Uninstall the script.
      2. Restart Firefox.
      3. Reinstall the script.
    4. Post the exact, unedited script – that you are using – at pastebin.com, and link to it here.

    5. Uninstall any other script for ink361.com, and install just the script below.
      Does it work?
      If not, post the console log, or Firebug’s log, at pastebin.com.

    // ==UserScript==
    // @name        _del me
    // @namespace   _pc
    // @include     http://ink361.com/*
    // @grant       GM_addStyle
    // ==/UserScript==
    /*- The @grant directive is needed to work around a major design
        change introduced in GM 1.0.
        It restores the sandbox.
    */
    console.log ("Start: ", Date ());
    
    var urlsToLoad  = [
        'http://ink361.com/#/users/206053596/photos'
        , 'http://ink361.com/#/users/199101377/photos'
        , 'http://ink361.com/#/users/203767882/photos'
    ];
    
    /*--- Since many of these sites load large pictures, Chrome's and
        Firefox's injection may fire a good deal before the image(s)
        finish loading.
        So, insure script fires after load:
    */
    window.addEventListener ("load", FireTimer, false);
    if (document.readyState == "complete") {
        FireTimer ();
    }
    //--- Catch new pages loaded by WELL BEHAVED ajax.
    window.addEventListener ("hashchange", FireTimer,  false);
    
    function FireTimer (zParam) {
        console.log ("Fire: ", zParam);
        console.log (Date ());
        setTimeout (GotoNextURL, 5000); // 5000 == 5 seconds
    }
    
    function GotoNextURL () {
        var numUrls     = urlsToLoad.length;
        var urlIdx      = urlsToLoad.indexOf (location.href);
        urlIdx++;
        if (urlIdx >= numUrls)
            urlIdx = 0;
    
        console.log ("Loading: ", urlsToLoad[urlIdx]);
        location.assign (urlsToLoad[urlIdx]);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a string that has curly quotes in it. I'd like to replace
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I have an autohotkey script which looks up a word in a bilingual dictionary
I know there's a lot of other questions out there that deal with this
i got an object with contents of html markup in it, for example: string

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.