User:Nux/monobook.js
Appearance
< User:Nux
(Redirected from User:EcceNux/monobook.js)Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin is at User:Nux/monobook.css. |
function nuxjs(js_wikiurl)
{
document.write('<'+'script type="text/javascript" src="' + js_wikiurl + '&action=raw&ctype=text/javascript&dontcountme=s"'+'><'+'/'+'script>');
}
/*
== Popups ==
Original: [[:en:User:Lupin/popups.js]]
*/
// disabled by default
if (document.cookie.indexOf("popup_disabled=0")!=-1)
{
//
// Settings
var simplePopups=true;
var popupDelay=2; // opóźnienie w sekundach
var popupFixRedirs=true; // naprawianie linków do przekierowań
var popupFixDabs=true; // naprawianie linków do stron ujednoznaczniających
var popupRevertSummaryPrompt=true; // możliwość zmiany tekstu przy revertowaniu
var popupOnlyArticleLinks=false; // nie tylko linki z artykułów
var imagePopupsForImages=false; // nie wyświetlanie obrazków nad obrazkami
}
/*
== Various scripts ==
*/
nuxjs('http://wiki.riteme.site/w/index.php?title=User:Nux/replylinks.js');
nuxjs('http://pl.wikipedia.org/w/index.php?title=Wikipedysta:Nux/SearchBox.js');
window.hideSidebarByDefault = true;
nuxjs('http://pl.wikipedia.org/w/index.php?title=Wikipedysta:Nux/hideSidebar.js');
/*
== Private ;) ==
*/
//
// Ustawienia
//
disableRealTitle = true;
//
// OnLoad...
//
$(function()
{
//
// extra tabs
//
if (mw.config.get('wgNamespaceNumber')!=-1)
{
var els = document.getElementById('ca-talk').parentNode.getElementsByTagName('li');
var nn = (mw.config.get('wgNamespaceNumber')%2==1) ? mw.config.get('wgNamespaceNumber')-1 : mw.config.get('wgNamespaceNumber');
var tmp = encodeURIComponent(mw.config.get('wgTitle'));
els[0].innerHTML += '<a href="/w/index.php?title=Special:Prefixindex&namespace='+nn+'&from='+tmp+'">.*</a>';
els[1].innerHTML += '<a href="/w/index.php?title=Special:Prefixindex&namespace='+(nn+1)+'&from='+tmp+'">.*</a>';
}
//
// Upper menu
//
var el = document.getElementById('pt-userpage');
el.style.cssText = 'font-weight:bold';
var elBefore = document.getElementById('pt-mytalk');
elBefore.style.cssText = 'font-weight:bold';
elBefore.firstChild.innerHTML = 'talk';
var elNew = document.createElement('li');
elNew.innerHTML = '<a href="/w/index.php?title=Special:Prefixindex&namespace=2&from=Nux/">nux/</a>';
elBefore.parentNode.insertBefore(elNew, elBefore);
var elNew = document.createElement('li');
elNew.innerHTML = '<a href="/w/index.php?title=Special:Prefixindex&namespace=3&from=Nux/">talk/</a>';
elBefore.parentNode.insertBefore(elNew, elBefore);
var elNew = document.createElement('li');
elNew.innerHTML = '<a href="/wiki/User:Nux/monobook.js?diff=cur">mb.js</a>.<a href="/wiki/User:Nux/monobook.css">css</a>';
elBefore.parentNode.insertBefore(elNew, elBefore);
var elNew = document.createElement('li');
elNew.innerHTML = '<a href="http://meta.wikimedia.org/wiki/Help:Variable">meta:var</a>';
elBefore.parentNode.insertBefore(elNew, elBefore);
// popups on/off (works after reloading)
var elNew = document.createElement('li');
if (document.cookie.indexOf("popup_disabled=0")!=-1)
elNew.innerHTML = '<a href="javascript:var xxx = document.cookie=\'popup_disabled=1; path=/\'">pop-off</a>';
else
elNew.innerHTML = '<a href="javascript:var xxx = document.cookie=\'popup_disabled=0; path=/\'">pop-on</a>';
elBefore.parentNode.insertBefore(elNew, elBefore);
});
// END OF User:Nux/monobook.js