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 8488243
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:28:45+00:00 2026-06-10T21:28:45+00:00

I wish to load a list of webpages sequentially, with Greasemonkey. var list =

  • 0

I wish to load a list of webpages sequentially, with Greasemonkey.

var list = array ('http://www.google.com', 'site2', 'site3', 'site4');
window.location.href = list[0];

The script should work as follows: open site 1, wait 5 seconds, open site 2, wait 5 seconds, etc.

I don’t know how to make the script open sites in sequence, maybe compare the actual URL to the list and move on the next one(?).

  • 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-10T21:28:45+00:00Added an answer on June 10, 2026 at 9:28 pm

    This approach, for Chrome, will also work in Greasemonkey.

    Put your sites in an array, like that, but you must also set your @include, @exclude, and @match directives to fire on the appropriate sites.

    Putting it all together, here’s a complete script:

    // ==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];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wish to load the web page from BBC rss feed with the HttpGet
I have a website that I wish to load in a UIWebView, but it
I have a large function that I wish to load only when it is
I wish to use a jQuery .load(oracle apex url) query. I have a main
I have a load of signatures I wish to compare (all in ISF -
i wish to grab a load of elements, check if their id contains 'other'
I have a flash object I wish to load and I believe the best
I have a particular piece of software that i wish to load on windows
I wish to display a list of thoughts instead of showing only 1 thought
I am using Jquery youtube player plugin found here: http://badsyntax.github.com/jquery-youtube-player/ The plugin allows you

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.