View difference between Paste ID: wuXh561J and yNVBFjeu
SHOW: | | - or go back to the newest paste.
1
// ==UserScript==
2
// @name         KotakAU Auto-refresh disable
3
// @namespace    http://your.homepage/
4
// @version      0.1
5
// @description  Discards the timer used to refresh pages on KotakAU after 5 minutes of inactivity
6
// @author       os42
7
// @match        http://www.kotaku.com.au/20*
8
// @match        https://www.kotaku.com.au/20*
9
// @match        http://www.gizmodo.com.au/20*
10
// @match        https://www.gizmodo.com.au/20*
11
// @match        http://www.lifehacker.com.au/20*
12
// @match        https://www.lifehacker.com.au/20*
13
// @grant        none
14
// @run-at document-start
15
// ==/UserScript==
16
17-
var si = window.setInterval;
17+
(function() {
18-
window.setInterval = function(f, i) {
18+
    var si = window.setInterval;
19-
    if (i !== 1e3) {
19+
    window.setInterval = function(f, i) {
20-
        return si(f,i);
20+
        if (i !== 1e3) {
21
            return si(f,i);
22-
    return false;
22+
        }
23-
}
23+
        return false;
24
    }
25
})();