Advertisement
Guest User

Auto woot and Bg

a guest
Sep 30th, 2014
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name       AutoWooter for plug.dj
  3. // @namespace  none
  4. // @version    1.0
  5. // @description  Auto woot and Bg changer for Plug.Dj
  6. // @match      https://plug.dj/*
  7. // @copyright  2014+, Gottesman
  8. // ==/UserScript==
  9. function wootclick(){if($("#meh").hasClass("selected")){$(document).find("#wtime").text("meh clicked, no woot");console.log("meh clicked, no woot")}else if($("#dj-button").hasClass("is-quit")){$(document).find("#wtime").text("actualy dj-ing, no woot");console.log("actualy dj-ing, no woot")}else{if($("#woot").hasClass("selected")){wm="AutoWooted "+mt+" minutes and "+parseInt(st)+" seconds ago";console.log(wm);$(document).find("#wtime").text(wm);vl=$(document).find("#vote").position().left;vt=$(document).find("#vote").position().top;$(document).find("#wooter").css("left",vl+"px");$(document).find("#wooter").css("top",vt-52+"px");if(st==59.5){mt=mt+1;st=0}else{st=st+.5}}else{$("#woot").click();mt=0;st=0}}}function c_bgc(){$(document).find("#input_changer").val("");$(document).find(".change_back").hide();$(document).find("#new-background").css("background-image","url("+window.finalbg+")")}function s_bgc(e){window.actualbg=$(document).find("#input_changer").val();$(document).find("#new-background").css("background-image","url("+window.actualbg+")");if(e==true){window.finalbg=window.actualbg;c_bgc()}else{window.finalbg="http://mfbea.com/wp-content/uploads/2013/10/funny_background_music_free.jpg"}}function cbg(){var e="http://mfbea.com/wp-content/uploads/2013/10/funny_background_music_free.jpg";$(document).find("#room").prepend('<div id="new-background" style="background:url('+e+') no-repeat 45% 0%;background-size:contain;background-color:black;position: absolute;top: 54px;left: -292px;z-index: -4;width: 1600px;height: 900px;"></div>');setTimeout(function(){$(document).find("#playback-controls").css("left","14px")},1e3)}function dev(){var e="http://mfbea.com/wp-content/uploads/2013/10/funny_background_music_free.jpg";var t=setInterval(function(){if($(document).find("#playback-controls").length==1){cbg();clearInterval(t)}},250);$(document).find("#playback .background img").hide();$(document).find("#playback .background").hide();$(document).find("#avatars-container").hide();$(document).find("#playback").css({top:"54px",width:"472px",height:"268px"});$(document).find("#playback-container").css({border:"solid 4px rgb(46, 46, 46)",left:"6px",background:"black","box-shadow":"0 0 0 20px rgba(185, 185, 185, 0.3), 0px 0px 10px black",top:"20px"});$(document).find("#playback-controls").css({"margin-left":"4px","margin-top":"24px"});if(typeof document.getElementById("vote")!="undefined"){var n=false;var r="";var i=document.createElement("div");i.id="wooter";i.style.display="none";var s=document.createElement("span");s.id="ws";var o=document.createElement("span");o.id="wtime";var u=document.createTextNode("Start!");var a=document.createTextNode("AutoWoot!");s.appendChild(u);o.appendChild(a);i.appendChild(s);i.appendChild(o);document.body.appendChild(i);var f=document.createElement("style");f.appendChild(document.createTextNode("div#wooter, div#bg_ch {position: fixed; top: 10px; left: 10px;padding: 15px 20px;background: #282c35;z-index: 10;color: white; border-radius: 4px; cursor:pointer;overflow: hidden;} #wooter.wooted{background:rgb(52, 101, 175);} span#ws {position: absolute;left: 0;right: 0;text-align: center;background: #282c35;padding: 15px 0;top: 0;display: none;} .wooted span#ws {background: rgb(52, 101, 175);} #bg_ch{left: 118.5px;top: 479px;}div#bgchanger {position: fixed;width: 700px;height: 220px;background: #282c35;display: inline-block;top: 50%;left: 50%;margin-top: -125px;margin-left: -350px;overflow: hidden;border-radius: 6px;box-shadow: 0 1px 20px -5px black;z-index: 999;}div#topmessage {padding: 8px;background: rgb(0, 101, 133);position: relative;}#topmessage span {font-size: 20px;margin-right: 43px;}div#close_changer {position: absolute;background-color: rgb(122, 16, 16);width: 43px;height: 43px;display: inline-block;right: 0;top: 0;background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgBAMAAACBVGfHAAAAKlBMVEUAAAABAQEAAAAAAAAAAAABAQEBAQEBAQEAAAAAAAAAAAABAQEBAQEBAQEZIThOAAAADnRSTlMAngJUFZnP0XM0DvO8lFjkX8oAAABzSURBVCjPY6AbWARjLIDSjQoQmqUSKsAqBKHdDWBKAxXACpKBBLISN6AChBKoAoQSiAIEEFQAK0AARiGoAoSSZDTXeh9C5bMUAy1CBu4GrEKoCsBuQQCQFTAlMF9AlSAUQJQgFECVIBSgKGmGKb3JQC8AAHhtD2xv7Pz3AAAAAElFTkSuQmCC');background-repeat: no-repeat;background-position: 50%;cursor: pointer;}div#close_changer:hover{background-color:rgb(168, 10, 10);}div#content_changer {padding: 10px;}input#input_changer {display: block;width: 94%;margin: auto;padding: 5px;border: solid 1px grey;border-radius: 5px;text-align: center;}span#info {padding: 5px 0;display: block;}div#default_change {left: 0;background: rgb(77, 77, 77);}div#test_change {left: calc(100% / 3);background: grey;}div#save_change{right:0;background:#9BBE24;}.btn_down{opacity:0.8;position: absolute;bottom: 0;padding: 8px 0;width: calc(100% / 3);}.btn_down span {font-size: 20px;display: block;}.btn_down, .btn_down * {cursor: pointer;}.btn_down:hover {opacity: 1;}div#back_click {position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: black;opacity: 0.2;}div#back_click:hover{opacity:0;}"));document.head.appendChild(f);(function(){function e(){clearInterval(t);vl=$(document).find("#vote").position().left;vt=$(document).find("#vote").position().top;$(document).find("#wooter").show();$(document).find("#wooter").css("left",vl+"px");$(document).find("#wooter").css("top",vt-52+"px")}var t=setInterval(function(){if($(document).find("#vote").length==1)e()},11)})();$("#wooter").click(function(){if(n===false){$(document).find("#wooter").addClass("wooted");$(document).find("#ws").text("Stop!");r=setInterval(wootclick,500);n=true}else{$(document).find("#wooter").removeClass("wooted");clearInterval(r);n=false;$(document).find("#wtime").text("AutoWoot!");$(document).find("#ws").text("Start!");console.log("AutoWoot stopped")}});$("#wooter").mouseover(function(){$(document).find("#ws").show()});$("#wooter").mouseout(function(){$(document).find("#ws").hide()});var l=document.createElement("div");l.id="bg_ch";var c=document.createElement("span");c.id="bg_btn";c.onclick="$(document).find('.change_back').hide()";var h=document.createTextNode("Change Background");c.appendChild(h);l.appendChild(c);document.body.appendChild(l);$("body").append('<div id="dialog-container" class="change_back" style="display:none;"><div id="bgchanger"><div id="topmessage"><span>Change Background</span><div id="close_changer"></div></div><div id="content_changer"><input id="input_changer" type=text placeholder="URL to image"></input><span id="info">To use images from your own computer write it as an URL, example:<br>For an image titled "<i>image.jpg</i>" located in the desktop<br>of the user "<i>Example</i>" use this:<br><b>file:///C:/Users/Example/Desktop/image.jpg</b></span><br><div id="default_change" class="btn_down"><span>Default Image</span></div><div id="test_change" class="btn_down"><span>Test Image</span></div><div id="save_change" class="btn_down"><span>Save Image</span></div></div></div><div id="back_click"></div></div></div>');$(document).find("#bg_ch").css({left:"118.5px",top:"479px"});$("#bg_ch").click(function(){$(document).find(".change_back").show()});$("#close_changer").click(function(){c_bgc()});$("#back_click").click(function(){c_bgc()});$("#test_change").click(function(){s_bgc(false)});$("#save_change").click(function(){s_bgc(true)});$("#default_change").click(function(){$(document).find("#new-background").css("background-image","url(http://mfbea.com/wp-content/uploads/2013/10/funny_background_music_free.jpg)");$(document).find("#input_changer").val("http://mfbea.com/wp-content/uploads/2013/10/funny_background_music_free.jpg")})}}var st=0;var mt=0;var vl=0;var vt=0;var wm="";var w=false;var savebg=false;var bgimg="http://mfbea.com/wp-content/uploads/2013/10/funny_background_music_free.jpg";window.actualbg=bgimg;window.finalbg=bgimg;window.onload=function(){var e=setInterval(function(){if($(document).find("#playback").length==1){clearInterval(e);setTimeout(dev(),100);console.log("no dev")}else{console.log("yes dev")}},250)}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement