مۇنازىرىلەر » قۇرۇش تەلىپى

[script request] Stop auto-reload of page

§
يوللانغان ۋاقتى: 2015-09-07

[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
§
يوللانغان ۋاقتى: 2015-09-07

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

§
يوللانغان ۋاقتى: 2015-09-07

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
§
يوللانغان ۋاقتى: 2015-09-07

Well then post a list of the example sites.

§
يوللانغان ۋاقتى: 2015-09-07

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

woxxomMod
§
يوللانغان ۋاقتى: 2015-09-07

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

§
يوللانغان ۋاقتى: 2015-09-07

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

woxxomMod
§
يوللانغان ۋاقتى: 2015-09-07
تەھرىرلەنگەن ۋاقتى: 2015-09-07

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.

§
يوللانغان ۋاقتى: 2015-09-07
تەھرىرلەنگەن ۋاقتى: 2015-09-07

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

§
يوللانغان ۋاقتى: 2015-09-07

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.

§
يوللانغان ۋاقتى: 2015-09-07

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?

§
يوللانغان ۋاقتى: 2015-09-07

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
§
يوللانغان ۋاقتى: 2015-09-08
تەھرىرلەنگەن ۋاقتى: 2015-09-08

// ==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);
§
يوللانغان ۋاقتى: 2015-09-08

Thanks, but that doesn't work here.

Deleted user 15079
§
يوللانغان ۋاقتى: 2015-09-08

Try updated script.

§
يوللانغان ۋاقتى: 2015-09-08

Still doesn't work.

Deleted user 15079
§
يوللانغان ۋاقتى: 2015-09-08
تەھرىرلەنگەن ۋاقتى: 2015-09-08

add an * or www. after http://

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

TamperMonkey/Chrome was a little more picky.

§
يوللانغان ۋاقتى: 2015-09-08

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

Deleted user 15079
§
يوللانغان ۋاقتى: 2015-09-08
تەھرىرلەنگەن ۋاقتى: 2015-09-08

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

§
يوللانغان ۋاقتى: 2015-09-08

Well thanks anyway. Much appreciated.

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.