F365 Temporary Refresh Fix

Append random variable to links

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         F365 Temporary Refresh Fix
// @description  Append random variable to links
// @grant        none
// @match        http://forum.football365.com/*
// @version 0.0.1.20150908100349
// @namespace https://greasyfork.org/users/14019
// ==/UserScript==

$('a').each(function(){
     if (this.href.indexOf("?") > -1) {
         var randomString = '&'+Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 5);
         if (this.href.indexOf("#") > -1) { 
             this.href = this.href.slice(0, this.href.indexOf("#")) + randomString + this.href.slice(this.href.indexOf("#"));
         } else {
         this.href += randomString
         }
     }
})