Conversaciones » Peticiones de scripts

[script request] Stop auto-reload of page

§
Publicado: 7/9/2015

[script request] Stop auto-reload of page

Is there a script available that will stop pages from reloading themselves? I view a lot of news sites and this is a common problem. You will be reading the page - or writing a comment! - and the page will refresh suddenly.

Thanks.

woxxomMod
§
Publicado: 7/9/2015

Googling it shows me there are addons and config tweaks for FF and extensions for Chrome.

§
Publicado: 7/9/2015

Thanks, but that doesn't help me. The solutions there don't affect javascript, or if the proposed ones might work, require coding I'm not capable of. I can kill all javascript for a site, and that would work, but I don't want to do that.

woxxomMod
§
Publicado: 7/9/2015

Well then post a list of the example sites.

§
Publicado: 7/9/2015

drudgereport.com is one that uses javascript, I think.

woxxomMod
§
Publicado: 7/9/2015

That site is extremely slow here and apparently doesn't autoreload. Any other examples?

§
Publicado: 7/9/2015

Strange, it's very fast here and reloads frequently. I'll have to keep looking for another example. Thanks.

woxxomMod
§
Publicado: 7/9/2015
Editado: 7/9/2015

The site managed to reload itself after a while. Its script uses window.location.reload and userscripts cannot overwrite/block it. The only solution is to write/use a browser extension that blocks http request to load the url. Try Requestly extension and make a rule to block http://drudgereport.com when the "source" (request initiator) is http://drudgereport.com or maybe some other condition, idk.

§
Publicado: 7/9/2015
Editado: 7/9/2015

maybe try this :
http://userscripts-mirror.org/scripts/show/125995
this script kills all setInterval/setTimeout callbacks; sometimes it helps.

§
Publicado: 7/9/2015

Thanks guys. No success so far with either of those two possibilities, but I asked over at the Requestly extension page, so we shall see.

§
Publicado: 7/9/2015

I somehow misunderstood you. The 5th line of drudgereport.com script is:

var timer = setInterval("autoRefresh()", 1000 * 47 * 3);
Just kill this timer and all annoyances will be cured?

§
Publicado: 7/9/2015

Hi. Sounds good to me, though I don't know how. I could kill script on the whole page, but that nukes other valuable things, so the idea is to focus on the autorefresh. I've seen many complaints about this behavior, but never an adequate solution.

Deleted user 15079
§
Publicado: 8/9/2015
Editado: 8/9/2015

// ==UserScript==
// @name        Drudge Report - No Reload
// @namespace   Drudge Report
// @description Disable automatic reloads on Drudge Report.
// @include     http://drudgereport.com/*
// @version     1
// @grant       none
// ==/UserScript==
var script = document.createElement("script");
script.innerHTML = '(function(){clearInterval(timer); autoRefresh = function(){};})();';
var body = document.getElementsByTagName("body")[0];
body.appendChild(script);
§
Publicado: 8/9/2015

Thanks, but that doesn't work here.

Deleted user 15079
§
Publicado: 8/9/2015

Try updated script.

§
Publicado: 8/9/2015

Still doesn't work.

Deleted user 15079
§
Publicado: 8/9/2015
Editado: 8/9/2015

add an * or www. after http://

// @include http://*drudgereport.com/*

TamperMonkey/Chrome was a little more picky.

§
Publicado: 8/9/2015

Dude, you nailed it! Great script. This should get uploaded. I know there's demand for killing autorefresh. Thanks much!

Deleted user 15079
§
Publicado: 8/9/2015
Editado: 8/9/2015

Sad thing is it's only for that website as all sites will use their own method(s).

§
Publicado: 8/9/2015

Well thanks anyway. Much appreciated.

Publicar respuesta

Inicia sesión para responder.