How do I open a list of pages automatically and sequentially?

后端 未结 2 772
滥情空心
滥情空心 2020-12-10 21:55

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

var list = array (\'http://www.google.com\', \'site2\', \'site3\', \'site4\');
window.loca         


        
2条回答
  •  温柔的废话
    2020-12-10 22:30

    Two ways I can think of for doing this are:

    Using gm_getvalue, gm_setvalue to retrieve, store the index of current site in list to Greasemonkey's persistent memory.

    Or, using something like:

    setTimeout(function(){
        window.location.href = (list.length > list.indexOf(window.location.href)) ? list[list.indexOf(window.location.href)+1] : list[0];
    },5000)
    

提交回复
热议问题