Cinema Mode (Megavideo,youtube etc.)

in Ideas and script requests
Subscribe to Cinema Mode (Megavideo,youtube etc.) 8 posts, 4 voices



vtz User

There is a great feature integrated in the new megavideo site called cinema mode, which simply darkens everything around the video to create an easy viewing experience.

EXAMPLE: http://www.megavideo.com/?v=ZGHFV9K9
On the bottom right corner is an option or cinema mode.

I would like this feature with other video sites with a button in the take bar or on the video itself to turn on video mode in youtube etc. Thanks!

Also if there is a script to bypass the 1 hour viewing limit on megaupload that would be appreciated as well.

Thanks!

 
Tim Smart Scriptwright

I think I have this one sorted.

 
Tim Smart Scriptwright

Done: http://userscripts.org/scripts/show/37977

 
JoeSimmons Scriptwright

There already was one for youtube. It's called "YouTube Lights Out".

 
Tim Smart Scriptwright

Haha never saw that. But I fixed the issue where it wasn't stretched all the way down the page. I'll post the fix on his script.

 
vtz User

Thanks Tim!

 
Tim Smart Scriptwright

Have just updated to multiple darkness levels, and repositioned the toggle link. Still at top of the screen though.

 
sizzlemctwizzle Scriptwright

ahem....cough....

// ==UserScript==
// @name           Direct Megavideo Flv Link
// @description    Download megavideo movies directly so you don't get spammed with porn
// @include        http://www.megavideo.com/?v=*
// ==/UserScript==

function decrypt(str, key1, key2) {
    var _loc1 = [];
    for (var _loc3 = 0; _loc3 < str.length; ++_loc3) {
    switch (str.charAt(_loc3)) {
    case "0":{
    _loc1.push("0000");
    break;
    } 
    case "1":{
    _loc1.push("0001");
    break;
    } 
    case "2":

            {

                _loc1.push("0010");

                break;

            } 

            case "3":

            {

                _loc1.push("0011");

                break;

            } 

            case "4":

            {

                _loc1.push("0100");

                break;

            } 

            case "5":

            {

                _loc1.push("0101");

                break;

            } 

            case "6":

            {

                _loc1.push("0110");

                break;

            } 

            case "7":

            {

                _loc1.push("0111");

                break;

            } 

            case "8":

            {

                _loc1.push("1000");

                break;

            } 

            case "9":

            {

                _loc1.push("1001");

                break;

            } 

            case "a":

            {

                _loc1.push("1010");

                break;

            } 

            case "b":

            {

                _loc1.push("1011");

                break;

            } 

            case "c":

            {

                _loc1.push("1100");

                break;

            } 

            case "d":

            {

                _loc1.push("1101");

                break;

            } 

            case "e":

            {

                _loc1.push("1110");

                break;

            } 

            case "f":

            {

                _loc1.push("1111");

                break;

            } 

        } // End of switch

    } // end of for

    _loc1 = _loc1.join("").split("");

    var _loc6 = [];

    for (var _loc3 = 0; _loc3 < 384; ++_loc3)

    {

        key1 = (key1 * 11 + 77213) % 81371;

        key2 = (key2 * 17 + 92717) % 192811;

        _loc6[_loc3] = (key1 + key2) % 128;

    } // end of for

    for (var _loc3 = 256; _loc3 >= 0; --_loc3)

    {

        var _loc5 = _loc6[_loc3];

        var _loc4 = _loc3 % 128;

        var _loc8 = _loc1[_loc5];

        _loc1[_loc5] = _loc1[_loc4];

        _loc1[_loc4] = _loc8;

    } // end of for

    for (var _loc3 = 0; _loc3 < 128; ++_loc3)

    {

        _loc1[_loc3] = _loc1[_loc3] ^ _loc6[_loc3 + 256] & 1;

    } // end of for

    var _loc12 = _loc1.join("");

    var _loc7 = [];

    for (var _loc3 = 0; _loc3 < _loc12.length; _loc3 = _loc3 + 4)

    {

        var _loc9 = _loc12.substr(_loc3, 4);

        _loc7.push(_loc9);

    } // end of for

    var _loc2 = [];

    for (var _loc3 = 0; _loc3 < _loc7.length; ++_loc3)

    {

        switch (_loc7[_loc3])

        {

            case "0000":

            {

                _loc2.push("0");

                break;

            } 

            case "0001":

            {

                _loc2.push("1");

                break;

            } 

            case "0010":

            {

                _loc2.push("2");

                break;

            } 

            case "0011":

            {

                _loc2.push("3");

                break;

            } 

            case "0100":

            {

                _loc2.push("4");

                break;

            } 

            case "0101":

            {

                _loc2.push("5");

                break;

            } 

            case "0110":

            {

                _loc2.push("6");

                break;

            } 

            case "0111":

            {

                _loc2.push("7");

                break;

            } 

            case "1000":

            {

                _loc2.push("8");

                break;

            } 

            case "1001":

            {

                _loc2.push("9");

                break;

            } 

            case "1010":

            {

                _loc2.push("a");

                break;

            } 

            case "1011":

            {

                _loc2.push("b");

                break;

            } 

            case "1100":

            {

                _loc2.push("c");

                break;

            } 

            case "1101":

            {

                _loc2.push("d");

                break;

            } 

            case "1110":

            {

                _loc2.push("e");

                break;

            } 

            case "1111":

            {

                _loc2.push("f");

                break;

            } 

        } // End of switch

    } // end of for

    return (_loc2.join(""));

} // End of the function

function $(id) {
	return document.getElementById(id);
}

function $$(element) {
	return document.createElement(element);
}

function insertAfter(parent, newNode, refNode) {
	if(refNode.nextSibling) {
		return parent.insertBefore(newNode, refNode.nextSibling);
	}
	else {
		return parent.appendChild(newNode);
	}
}

function getNextSibling(startBrother){
  endBrother=startBrother.nextSibling;
  while(endBrother.nodeType!=1){
    endBrother = endBrother.nextSibling;
  }
  return endBrother;
}


var download_icon = 'data:image/gif;base64,R0lGODlhEAAQAMQAAIWOl8rKyoibetPT02hoarm6usPDw/Pz89ra2uTk5Hl6e6mrpmGNRH2vWunp'+
					'6e3t7ZPNX47LVbW1tZPIa5nXWvv7+1hZXfT2+HFxcfNXV2FhYZ6ens7OzvDw8GOPRf///yH5BAAA'+
					'AAAALAAAAAAQABAAAAWf4CeOX9SQJGIYi+CZniBsQCEa5Nt44nUBIlvCQ6RMiB7ORRH8JCoeCAUS'+
					'YVQ4H+ZH8kEgDp5Gg9HhYDGiRRcRODDIBvMH/VEPBgVJpyORyOl2d2aDcgQiGwd7D4sPDo6Ohh8b'+
					'HSoFlpYSBRwOkZN3AxwBHxMGGQYJGocXn6EBKwYFHakfAAgXHY2PDgkdARYiAArCGBgExhrIFpEo'+
  'zCQhADs=';

function addStyle() {
	var styles = [
		'#tube_downloadBox {position: fixed; right: 5px; bottom: 5px; z-index: 2512;opacity: 0.8;}',
		'#tube_downloadBox a, .tube_downloadBtt a, .tube_downloadBtt a:visited, .tube_downloadBtt a:link {font-size:11px;font-family:Verdana;font-weight:bold;color:#1F85C1 !important;text-align:center;outline:none;background-color: #DFF1FD;border:1px solid #B6D9EE;padding:4px;display:block;text-decoration:none;}',
		'#tube_downloadBox a:hover, .tube_downloadBtt a:hover {border:1px solid #AE150E;background-color:#CE1A10;color:#FFFFFF !important;text-decoration:none;}',
		'#tube_downloadBox img, .tube_downloadBtt img, #tube_downloadBox a:hover img, .tube_downloadBtt a:hover img {background:none;margin:0px;padding:0px;border:none;vertical-align:middle}',
		'.tube_downloadBtt {z-index:2512;text-align:right}',
		'.tube_downloadBtt a {display:block;padding-bottom:4px;}'
	];
	
	GM_addStyle(styles.join("\r\n"));
	
}
url = document.location.href;
GM_xmlhttpRequest({
    method: 'GET',
      url: 'http://www.megavideo.com/xml/videolink.php?v='+url.split('v=')[1],
    headers: {
        'User-agent': 'Mozilla/4.0 (compatible) Greasemonkey',
        'Accept': 'application/atom+xml,application/xml,text/xml',
    },
    onload: function(responseDetails) {
	text = responseDetails.responseText;
	var secs = text.split('runtime="')[1].split('"')[0];
	var s = text.split(' s="')[1].split('"')[0];
	var un = text.split('un="')[1].split('"')[0];
	var k1 = text.split('k1="')[1].split('"')[0];
	var k2 = text.split('k2="')[1].split('"')[0];
	var downloadBox = document.createElement('div');
	document.body.appendChild(downloadBox);
	downloadBox.id = 'tube_downloadBox';
	var flv = 'http://www'+s+".megavideo.com/files/"+decrypt(un, k1, k2)+'/';
	$('tube_downloadBox').innerHTML = '<a title="Download" onclick="return false;" id="tube_link" href="'+flv+'"><img src="'+ download_icon +'" width="16" height="16" /> Download</a>';
	addStyle();
    }
});

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel