Użytkownik:SH3VEK/monobook.js: Różnice pomiędzy wersjami

Z Nonsensopedii, polskiej encyklopedii humoru
M
Znacznik: edytor źródłowy
 
(Nie pokazano 165 wersji utworzonych przez 2 użytkowników)
Linia 1: Linia 1:
window.os_animateChangeWidth=function(){return 1;};
// Tools: [http://uncyclopedia.wikia.com/index.php?title=-&action=raw&smaxage=0&gen=js reload cache]

// <pre><nowiki>
/* 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;}"+
/* search default text provided by Nachteule */
"#p-search.stickpart{position: fixed !important; top: 4px !important;}"+
jQuery(document).ready(function() {
jQuery("#searchInput").val("Search");
"</style>").appendTo("head");

jQuery("#searchInput").css("color", "#888");
jQuery("#searchInput").bind("focus", function(event) {
$(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();});});
jQuery("#searchInput").val("");

jQuery("#searchInput").css("color", "");
/* Przełączane boczne menu */
});
addPortletLink("p-cactions","#","Przełącz","p-wide","Przełącza widok bocznego menu");
jQuery("#searchInput").bind("blur", function(event) {
$("#p-wide a").click(function(e){e.preventDefault();$("#content, #p-cactions .pBody, #p-logo").toggleClass("wide");});
if (jQuery("#searchInput").val() === "") {

jQuery("#searchInput").val("Search");
window.addEventListener("scroll",function(e){$("#p-search")[e.pageY>=46?"addClass":"removeClass"]("stickpart");});
jQuery("#searchInput").css("color", "#888");
});
}
});
})
/* UnDebate styling */
if( wgCanonicalNamespace == "" && wgPageName.substring(0,8) == "UnDebate" ) {
document.write('<style type="text/css">/*<![CDATA[*/ @import "http://uncyclopedia.wikia.com/index.php?title=MediaWiki:Skin/UnDebate_vector.css&action=raw&ctype=text/css"; /*]]>*/</style>');
}
importScript('http://uncyclopedia.wikia.com/wiki/User:Lyrithya/ajaxwatch.js'); // watch star
importScript('http://uncyclopedia.wikia.com/wiki/User:Lyrithya/share.js'); // prototype share links
//importScript('User:Lyrithya/vectorTabs.js'); // attempt to reorder the cactions links
/* wikimedia on 1.17-ish icons */
function iconsBottom() {
document.getElementById("f-poweredbyico").firstChild.innerHTML = '<img src="http://images1.wikia.nocookie.net/uncyclopedia/images/d/d4/Poweredby_mediawiki_88x31.png" height="31" width="88" alt="Powered by MediaWiki"/>';
document.getElementById("f-copyrightico").firstChild.innerHTML = '<img src="http://images1.wikia.nocookie.net/uncyclopedia/images/4/44/Cc-some_rights_88x31.png" height="31" width="88" alt="Creative Commons cc-by-nc-sa"/>';
}
YAHOO.util.Event.onContentReady('footer', iconsBottom);
// </nowiki></pre>

Aktualna wersja na dzień 18:57, 16 cze 2017

window.os_animateChangeWidth=function(){return 1;};

/* 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;}"+
"#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");});
});