Youtube auto Proxfree

this script automatically redirects youtube to a proxy.

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 Youtube auto Proxfree
// @description this script automatically redirects youtube to a proxy.
//
// @include http://www.youtube.com/watch?*
// @include https://www.youtube.com/watch?*
// @include http://*.youtube.com/watch?*
// @include https://*.youtube.com/watch?*
// @version 0.0.1.20140607005814
// @namespace https://greatest.deepsurf.us/users/2561
// ==/UserScript==
GM_xmlhttpRequest({
method: 'POST',
url: 'http://eu.proxfree.com/request.php?do=go',
data: 'get=' + encodeURIComponent(window.location.href),
headers: {
'User-agent': 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:13.0) Gecko/20100101 Firefox/13.0',
'Accept': 'application/xml,text/xml',
"Content-Type": "application/x-www-form-urlencoded"
},
onload: function(responseDetails) {
var res = responseDetails.responseText;
var premalinks = res.match(/(http:\/\/eu\.proxfree\.com\/permalink\.php\?.*\);)/im);
window.location = premalinks[0];
}
});