Posted on

Outlawed Youtube

In many countries around the world, youtube is outlawed and citizens cannot access free information and news. Governments have no right to censor what they do not own. We encourage everyone and everyone to charge their laser and board their vessels. Remember: anonymous is a defensive collective to stop online censorship and offline censorship, not to attack the harmless and undefended. In the spirit of this, I have included a script that when accessed by the firefox add-on greasemonkey while “proxify” youtube videos. Credit must go where credit is due. Both Marduk and Heyguise helped in the writing of this with their expertise in bots and malware respectively, and my expertise in rooting. Together we are strong. #StayStrong

// StayStrong
// @name  MirrorTubes: Watch Youtube Videos not available in your country without a proxy
// @namespace  http://www.theroyalanon.wordpress.com
// @description MirrorTubes: Watch Youtube Videos not available in your country without a proxy
// @include http://youtube.com/*v=*
// @include http://www.youtube.com/*v=*

// @homepage http://www.tubemirror.com
// @run-at document-start
// ==/UserScript==

var videoId = getUrlParameter('v')

var tubemirrorLogo = '<img src="http://www.tubemirror.com/siteimages/header.jpg">';
var tubemirrorUrl = 'http://www.tubemirror.com/video/' + videoId;
var tubemirrorTextLink = '<a title="TubeMirror" target="_blank" href="' + tubemirrorUrl + '">Watch on TubeMirror</a>';
var tubemirrorLogoLink = '<div id="tubemirrorLogoLink"><a title="TubeMirror" target="_blank" href="' + tubemirrorUrl + '"><p>YouTube has blocked this video!<br>Watch it on:</p>' + tubemirrorLogo + '</a></div>';

addTubeMirrorBox();

if (document.getElementById("watch-player-unavailable-message")) {
  rewriteUnavailableMessage();
}



function rewriteUnavailableMessage(){
  var styles = [
    '#tubemirrorLogoLink a {font-size:16px;font-weight:bold;color:#60AFFC;display:block;text-decoration:none;outline:none;}',
    '#tubemirrorLogoLink a p {padding:10px;}',
  ];

  GM_addStyle(styles.join("\r\n"));
  
  document.getElementById("watch-player-unavailable-message").innerHTML = tubemirrorLogoLink;
}

function addTubeMirrorBox() {
  var styles = [
    '#tubemirrorBox {position: fixed; right: 5px; bottom: 40px; z-index: 1000;opacity: 0.8;}',
    '#tubemirrorBox a {font-size:11px;font-family:Verdana;font-weight:bold;color:#509FFC !important;text-align:center;outline:none;background-color: #DFF1FD;border:1px solid #B6D9EE;padding:4px;display:block;text-decoration:none;}',
    '#tubemirrorBox a:hover {border:1px solid #AE150E;background-color:#CE1A10;color:#FFFFFF !important;text-decoration:none;}',
    '#tubemirrorBox img, #tubemirrorBox a:hover img {background:none;margin:0px;padding:0px;border:none;vertical-align:middle}'
  ];

  GM_addStyle(styles.join("\r\n"));

  var tubemirrorBox = document.createElement('div');
  document.body.appendChild(tubemirrorBox);
  tubemirrorBox.id = 'tubemirrorBox';
  tubemirrorBox.innerHTML = tubemirrorTextLink;
}

function getUrlParameter(name)
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return results[1];
}
Advertisements

About theroyalanon

A computer geek, software engineer, and Internet activist. This is my podium by which I taunt the general populace into rebellion. Retired from LulzSec, and supporting Anonymous.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s