User:Tra/monobook.js
Appearance
< User:Tra
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:Tra/monobook.css. |
// [[User:Lupin/popups.js]]
document.write('<script type="text/javascript" src="'
+ 'http://wiki.riteme.site/w/index.php?title=User:Lupin/popups.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></scr' + 'ipt>');
popupFixDabs=true;
popupWatchDisambiggedPages=true;
popupOnlyArticleLinks=false;
popupOnEditSelection=false;
popupDragHandle='popupTopLinks';
popupRevertSummaryPrompt=true;
popupEditCounterTool='custom';
popupEditCounterUrl='http://tools.wikimedia.de/~interiot/cgi-bin/Tool1/wannabe_kate?username=$1&site=wiki.riteme.site';
popupAdminLinks=true;
// Script from [[User:Tra/sidebartranslate.js]]
document.write('<script type="text/javascript" src="'
+ 'http://wiki.riteme.site/w/index.php?title=User:Tra/sidebartranslate.js'
+ '&action=raw&ctype=text/javascript&dontcountme=s"></s'+'cript>');
function replace() {
var s = prompt("Search regexp?", '');
if(s) {
var r = prompt("Replace regexp?", '');
if(!r && r != '') return;
var txt = document.editform.wpTextbox1;
txt.value = txt.value.replace(new RegExp(s, "g"), r);
}
}
addOnloadHook(function () {
if(document.forms.editform) {
uwaddToolboxLink('javascript:replace()', 'Replace', 'ca-replace');
}
});
addOnloadHook(function () {
if (unescape(window.location.href).indexOf("Special:Watchlist") < 0) return;
// just one little ID attribute would be _so_ nice...
var nsSelectForm = document.getElementById('namespace');
while (nsSelectForm && !(nsSelectForm.tagName && nsSelectForm.tagName.toLowerCase() == 'form'))
nsSelectForm = nsSelectForm.parentNode;
if (!nsSelectForm) return;
var link = document.createElement('a');
link.id = 'listSince';
link.href = '#listSince'; // must have a href to show as link!
var then = +(new Date());
var fixLinkHref = function () {
var url = window.location.href.split('#')[0];
var days = ( +(new Date()) - then )/(1000 * 3600 * 24);
if (url.match(/[?&]days=/))
this.href = url.replace(/([?&]days=)[^&]*/, '$1'+days);
else
this.href = url + (url.indexOf('?') < 0 ? '?':'&') + 'days=' + days;
return true;
};
link.onclick = fixLinkHref;
link.onmousedown = fixLinkHref; // react to middle clicks too
var frag = document.createDocumentFragment();
frag.appendChild(document.createTextNode(' | '));
frag.appendChild(link);
link.appendChild(document.createTextNode('Changes'));
frag.appendChild(document.createTextNode(' since last load.'));
nsSelectForm.parentNode.insertBefore(frag, nsSelectForm);
});
importScript('User:AzaToth/twinkle.js');
addOnloadHook(function () {
mw.util.addPortletLink("p-personal", "/w/index.php?title=Special:Userlogin&wpName=Tra&wpRemember&returnto=" + wgPageName, "Log in (1)", "pt-login1", "Log in as Tra");
mw.util.addPortletLink("p-personal", "/w/index.php?title=Special:Userlogin&wpName=Tra non-admin&wpRemember&returnto=" + wgPageName, "(2)", "pt-login2", "Log in as Tra non-admin");
if(wgCanonicalSpecialPageName == false){addPortletLink("p-tb", "/wiki/Special:Prefixindex/" + wgPageName + "/", "Subpages", "t-subpages", "Show subpages of this page");
}
})
// addPurge
addOnloadHook(function () {
if(wgCanonicalNamespace == "Image" ) {
mw.util.addPortletLink('p-cactions', "/w/index.php?action=purge&title=" + wgPageName,
'Purge', 'ca-purge', 'Purge image', '0');
}
});