Created
November 25, 2012 22:00
-
-
Save gawel/4145587 to your computer and use it in GitHub Desktop.
Automaticaly use proxfree for youtube
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name proxfree youtube | |
// @namespace proxfree | |
// @include http://www.youtube.com/* | |
// @include https://www.youtube.com/* | |
// @include *proxfree* | |
// @version 1 | |
// ==/UserScript== | |
// | |
if (/.*proxfree.*/.exec(window.location.href)) { | |
if (/.*orig.*/.exec(window.location.href)) { | |
var url = window.location.href.split('orig=')[1]; | |
document.getElementsByTagName('input')[0].setAttribute('value', url); | |
document.getElementsByTagName('form')[0].submit(); | |
} else { | |
document.getElementById('pfproxy').setAttribute('style', 'display:none;'); | |
} | |
} else if (/.*youtube.*/.exec(window.location.href)) { | |
window.location.href = 'http://www.proxfree.com/?orig=' + window.location.href.split('&')[0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment