Youtube auto Proxfree

this script automatically redirects youtube to a proxy.

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

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

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

	
 
// ==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://greasyfork.org/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];
}
});