Firfox Page Refresher
|
|
I've used the "Facebook Page Refresher" script, and love it. But it only does the home page. I tried to create my own script but failed. What I want: A script that refreshes ALL pages at a 30 second (or so) interval. That way, my inbox, message board topics, facebook and myspace pages can all be refreshed. Hopefully this is possible. I thought it might be as simple as using a "*.*.com/* command or something. I was wrong :P |
|
|
It's probably even more simple than you think:
timeoutID = setTimeout(function(){location.reload(true)}, 30000);
Make sure you put any domains you want this to work on in the @include, don't use @include *.
|
|
|
Come to think of it, this might work better - it depends on the site I think...
timeoutID = setTimeout(function(){location.reload(false)}, 30000);
reload(forceget): If forceget is false or not specified, the browser may reload the page from its cache. however false is better if it works because the page will load faster. |
|
|
@Descriptor, I think you're over-thinking it. It seems to me that he already has a script to refresh the home page every n seconds, leading me to conclude... @Tom right click on the monkey icon (or the tools menu, if you prefer) and hit 'manage user scripts'. Select the facebook refresher, and change the include from "http://facebook.com" to "http://facebook.com/*" and that should work. Post back if it doesn't. -Joel |
|
|
I'm only over-thinking it because I'm not familiar with Facebook, and most importantly haven't seen the "Facebook Page Refresher" script (I even searched for it).
|
|
|
I'm not that familiar with Facebook either, but he had specified the home page, and that he wanted all other pages to refresh, too. Not that I'm familiar with myspace either (in fact I avoid it explicitly) but I presume that it's similar to a script refreshing just your home page instead of all myspace pages, such as those of your friends. Either way, the modification to the existing script should be pretty simple. -Joel |
|
|
Thanks so much guys, I'll first try editing the facebook script, then try out the new script so I can utilize it for all other webpages. You were both a big help, thanks |
|
|
I changed the script to include http://www.facebook.com/* like you said. Nothing changed, it still only refreshed the homepage. Any other thoughts. I'm not good with Java, only HTML...so writing my script isn't going well. I'm doing my best to learn though |
|
|
Well, either make a new script for those sites, adding them to the include as Joel mentioned, using either of the lines of code I posted; or give us a link to the "Facebook Page Refresher" script so we can see what it does.
|
|
|
After logging in quickly, it looks like you'll have to do some investigating; the include should look like:
-Joel |
|
|
I think this will work - complete script...
// ==UserScript==
// @name Page_Refresher
// @namespace http://userscripts.org/users/30614
// @description Reloads facebook.com and myspace.com every 60 seconds
// @include http://*.facebook.com/*
// @include http://*.myspace.com/*
// ==/UserScript==
// Add more domains to @include and this list
var domains = ["facebook.com","myspace.com"];
// Reload time in seconds
var reload = 60;
function checkDomainNames(){
var domainname = location.hostname.match(/\b\w[-\w]+\.\w{2,3}$/);
for(var i = 0; i < domains.length; i++){
if(domains[i] == domainname) return true;
}
return false;
}
if(checkDomainNames()){
reload = reload * 1000;
setTimeout(function(){location.reload(false)}, reload);
}
|
|
|
can't you do this with meta data, and also wouldn't it be better to only upload part of a page? |
|
|
I finished a script for facebook that reloads parts of the page every 60 seconds. http://userscripts.org/scripts/show/10682 |
|
|
you should really check my script if you want something like this for myspace... http://userscripts.org/scripts/show/6365 it uses ajax calls and updates your homepage every 20 seconds, without refreshing |
|
|
Dude I have that script for myspace. It kicks ass. My script now updates the Facebook homepage every 30 seconds and a whole bunch of other shit without a page refresh. |
