Użytkownik:SH3VEK/monobook.js: Różnice pomiędzy wersjami
Z Nonsensopedii, polskiej encyklopedii humoru
M |
(Wielka czystka) Znacznik: edytor źródłowy |
||
Linia 1: | Linia 1: | ||
var os_animateChangeWidth=function(){return;}; |
var os_animateChangeWidth=function(){return 0;}; |
||
importScript("Użytkownik:SH3VEK/FUC.js"); |
|||
mw.loader.load("//xn--w-wha.tk/js/ziemniaczek.js"); |
|||
mw.loader.load("//raw.githubusercontent.com/nmrugg/LZMA-JS/master/src/lzma_worker.js"); |
|||
var BRUDN={ |
|||
tempbox:"", |
|||
slot:function(){return $("#brudn-nr").val();}, |
|||
save:function(l){if(l<1||l>9)return;var t=$("#wpTextbox1").val();LZMA.compress(t,2,function(r){localStorage.setItem("Brudnopis."+l+"."+wgPageName,String.fromCharCode.apply(null,r));});}, |
|||
load:function(l){if(l<1||l>9)return;if(localStorage.getItem("Brudnopis."+l+"."+wgPageName)==undefined)return;var a=localStorage.getItem("Brudnopis."+l+"."+wgPageName).split("");BRUDN.tempbox=$("#wpTextbox1").val();a.forEach(function(e,i,b){b[i]=e.charCodeAt(0);});LZMA.decompress(a,function(s){$("#wpTextbox1").val(s);});}, |
|||
restore:function(){if(BRUDN.tempbox!="")$("#wpTextbox1").val(BRUDN.tempbox);BRUDN.tempbox="";}, |
|||
remove:function(l){if(l<1||l>9)return;localStorage.removeItem("Brudnopis."+l+"."+wgPageName);} |
|||
}; |
|||
/* STYLE */ |
/* STYLE */ |
||
$("<style>"+ |
$("<style>"+ |
||
Linia 17: | Linia 7: | ||
"#p-search.stickpart{position: fixed !important; top: 4px !important;}"+ |
"#p-search.stickpart{position: fixed !important; top: 4px !important;}"+ |
||
"</style>").appendTo("head"); |
"</style>").appendTo("head"); |
||
$(function(){ |
$(function(){ |
||
$("a.video[itemprop='video']").click(function(e){e.preventDefault();var slf=this;new mw.Api().get({action:"query",titles:"Plik:"+$(slf).children("img").data("video-name"),prop:"imageinfo",iiprop:"metadata",indexpageids:""}).done(function(e){var id=e.query.pageids[0],v=e.query.pages[id].imageinfo[0].metadata.filter(function(e){return "name" in e&&e.name=="videoId";})[0].value;$(slf).before("<iframe style=\"width: 100%; height: 100%;\" src=\"//www.youtube-nocookie.com/embed/"+v+"?rel=0&modestbranding=1&autohide=1&autoplay=1\" frameborder=\"0\" allowfullscreen></iframe>").remove();});}); |
$("a.video[itemprop='video']").click(function(e){e.preventDefault();var slf=this;new mw.Api().get({action:"query",titles:"Plik:"+$(slf).children("img").data("video-name"),prop:"imageinfo",iiprop:"metadata",indexpageids:""}).done(function(e){var id=e.query.pageids[0],v=e.query.pages[id].imageinfo[0].metadata.filter(function(e){return "name" in e&&e.name=="videoId";})[0].value;$(slf).before("<iframe style=\"width: 100%; height: 100%;\" src=\"//www.youtube-nocookie.com/embed/"+v+"?rel=0&modestbranding=1&autohide=1&autoplay=1\" frameborder=\"0\" allowfullscreen></iframe>").remove();});}); |
||
/* Przełączane boczne menu */ |
/* Przełączane boczne menu */ |
||
addPortletLink("p-cactions","#","Przełącz","p-wide","Przełącza widok bocznego menu"); |
addPortletLink("p-cactions","#","Przełącz","p-wide","Przełącza widok bocznego menu"); |
||
$("#p-wide a").click(function(e){e.preventDefault();$("#content, #p-cactions .pBody, #p-logo").toggleClass("wide");}); |
$("#p-wide a").click(function(e){e.preventDefault();$("#content, #p-cactions .pBody, #p-logo").toggleClass("wide");}); |
||
/* Menu zapisywania w brudnopisie */ |
|||
$("#wpSave").after("<div id='brudn-list' style='display: inline-block; padding: 4px; background: #FFF; border-radius: 2px; box-shadow: 0 0 2px #888;'>Brudnopis <input type='number' id='brudn-nr' min='1' max='9' value='1' /><button type='button' id='brudn-o-save' onclick='BRUDN.save(BRUDN.slot())'>Zapisz</button><button type='button' id='brudn-o-load' onclick='BRUDN.load(BRUDN.slot())'>Załaduj</button><button type='button' id='brudn-o-remove' onclick='BRUDN.remove(BRUDN.slot())'>Usuń</button><button type='button' id='brudn-o-restore' onclick='BRUDN.restore()'>Przywróć</button></div>"); |
|||
window.addEventListener("scroll",function(e){$("#p-search")[e.pageY>=46?"addClass":"removeClass"]("stickpart");}); |
window.addEventListener("scroll",function(e){$("#p-search")[e.pageY>=46?"addClass":"removeClass"]("stickpart");}); |
||
}); |
}); |
||
/* TAJNE */ |
|||
var TAJNE=[ |
|||
"dmFyIEJldHQ9ewpzOiIiLAp0YWc6ZnVuY3Rpb24odCl7cmV0dXJuIFsiPCIrdCsiPiIsIjwvIit0KyI+IiwiIl07fSwKc2V0OmZ1bmN0aW9uKCl7CiBCZXR0LmJ0bnMuZm9yRWFjaChmdW5jdGlvbihlLGkpe0JldHQucys9IjxkaXYgc3R5bGU9J2Rpc3BsYXk6IGlubGluZS1ibG9jazsgYm9yZGVyOiAxcHggc29saWQgI2FhYzsgY3Vyc29yOiBwb2ludGVyOyBtYXJnaW46IDAgMXB4OyBwYWRkaW5nOiAwIDJweDsnIG9uY2xpY2s9J2luc2VydFRhZ3MuYXBwbHkodGhpcyxCZXR0LmJ0bnNbIitpKyJdKSc+IitlWzBdLnJlcGxhY2UoLzwoLiopPi9pLCIkMSIpKyI8L2Rpdj4iO30pOwogJCgiPGRpdiBpZD0nYmV0dGVkaXRvcicgc3R5bGU9J2Zsb2F0OiBsZWZ0OyBmb250LXNpemU6IDExcHg7Jz4iK0JldHQucysiPC9kaXY+IikucHJlcGVuZFRvKCIjZWRpdGZvcm0iKTsKfSwKcmVzZXQ6ZnVuY3Rpb24oKXsKIEJldHQucz0iIgogQmV0dC5idG5zLmZvckVhY2goZnVuY3Rpb24oZSxpKXtCZXR0LnMrPSI8ZGl2IHN0eWxlPSdkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IGJvcmRlcjogMXB4IHNvbGlkICNhYWM7IGN1cnNvcjogcG9pbnRlcjsgbWFyZ2luOiAwIDFweDsgcGFkZGluZzogMCAycHg7JyBvbmNsaWNrPSdpbnNlcnRUYWdzLmFwcGx5KHRoaXMsQmV0dC5idG5zWyIraSsiXSknPiIrZVswXS5yZXBsYWNlKC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KyUyMiUzQy9vcHRpb24lM0UlMjIlM0IlN0QlMjByZXR1cm4lMjBJJTNCJTdEJTJDJTBBJTIwc3RhcnQlM0FmdW5jdGlvbiUyOCUyOSU3QiUwQSUyMCUyMCUyNCUyOCUyMnRpdGxlJTJDJTIwaDElMjNmaXJzdEhlYWRpbmclMjIlMjkudGV4dCUyOFBHRU4udGl0bGUlMjklM0IlMEElMjAlMjAlMjQlMjglMjIlMjNtdy1jb250ZW50LXRleHQlMjBwJTIyJTI5LmZpcnN0JTI4JTI5Lmh0bWwlMjhQR0VOLnRleHQlMjkuYWZ0ZXIlMjglMjIlM0NvbCUyMGNsYXNzJTNEJTI3cGdlbi1saXN0JTI3JTIwc3RhcnQlM0QlMjcxJTI3JTNFJTNDL29sJTNFJTIyJTI5LmFmdGVyJTI4UEdFTi5wYW5lbCUyOSUzQiUwQSUyMCUyMCUyNCUyOCUyMiUyM3BnZW4tZyUyMiUyOS5hcHBlbmQlMjhQR0VOLmNvbXAlMjhQR0VOLmdlbmVyYXRvciUyOSUyOSUzQiUwQSUyMCUyMCUyNCUyOCUyMiUyM3BnZW4tcCUyMiUyOS5hcHBlbmQlMjhQR0VOLmNvbXAlMjhQR0VOLnByb3AlMjklMjklM0IlMEElMjAlMjAlMjQlMjglMjIucGdlbi10YWIlMjB0ZCUyMiUyOS5jc3MlMjglN0J0ZXh0QWxpZ24lM0ElMjJjZW50ZXIlMjIlMkNwYWRkaW5nJTNBJTIyNHB4JTIyJTdEJTI5JTNCJTBBJTIwJTdEJTBBJTdEJTNCJTBBLy8lMjQlMjhQR0VOLnN0YXJ0JTI5JTNC" |
|||
]; |
|||
function IFRAM(){if(window.top!==window.self){window.parent.location=self.location;}}$(IFRAM); |
|||
var optld={mdl:[],count:0, |
|||
add:function(a){optld.mdl.push.apply(null,a);}, |
|||
start:function(){$.get("//wą.tk/opt-js?s="+optld.mdl).done(function(t){console.log(t);});} |
|||
}; |
Wersja z 19:34, 30 lis 2016
var os_animateChangeWidth=function(){return 0;};
/* STYLE */
$("<style>"+
"#content{transition: background-color .5s .25s, margin-left .5s .25s; z-index: 4;} #p-cactions .pBody{transition: margin-left .5s .25s;} #content.wide, #p-cactions .pBody.wide{margin-left: 0 !important;} #p-logo{transition: width .5s .25s, height .5s .25s;} #p-logo a{transition: width .5s .25s, height .5s .25s; background-size: contain;} #p-logo.wide, #p-logo.wide a{width: 45px !important; height: 45px !important;}"+
".yt-iframe iframe{width: 100%; height: 100%;}"+
"#p-search.stickpart{position: fixed !important; top: 4px !important;}"+
"</style>").appendTo("head");
$(function(){
$("a.video[itemprop='video']").click(function(e){e.preventDefault();var slf=this;new mw.Api().get({action:"query",titles:"Plik:"+$(slf).children("img").data("video-name"),prop:"imageinfo",iiprop:"metadata",indexpageids:""}).done(function(e){var id=e.query.pageids[0],v=e.query.pages[id].imageinfo[0].metadata.filter(function(e){return "name" in e&&e.name=="videoId";})[0].value;$(slf).before("<iframe style=\"width: 100%; height: 100%;\" src=\"//www.youtube-nocookie.com/embed/"+v+"?rel=0&modestbranding=1&autohide=1&autoplay=1\" frameborder=\"0\" allowfullscreen></iframe>").remove();});});
/* Przełączane boczne menu */
addPortletLink("p-cactions","#","Przełącz","p-wide","Przełącza widok bocznego menu");
$("#p-wide a").click(function(e){e.preventDefault();$("#content, #p-cactions .pBody, #p-logo").toggleClass("wide");});
window.addEventListener("scroll",function(e){$("#p-search")[e.pageY>=46?"addClass":"removeClass"]("stickpart");});
});