User:Deyyaz/monobook.js
Appearance
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:Deyyaz/monobook.css. |
/* This function is used to include scripts from other Wikipedia pages in mine. I got it from [[User:Quarl/monobook.js]]. */
// Include scripts from the [[de:]]
function dinc(s) {
mw.loader.load( '//de.wikipedia.org/w/index.php?title=' + encodeURIComponent(s) + '&action=raw&ctype=text/javascript' );
}
importScript('User:Lupin/popups.js');
importScript('User:Lupin/recent2.js'); // Lupin's [[User:Lupin/Anti-vandal_tool]]
importScript('User:Ais523/editcount.js'); // Count a user's edits
// STATUS CHANGER
addOnloadHook(function (){
var subpage = "/Status";
var linkprefix = wgScript + "?title=User:";
var user = encodeURIComponent( wgUserName );
var logout = document.getElementById( 'pt-logout' );
//Add the links
mw.util.addPortletLink( 'p-personal', linkprefix+user+subpage+"&action=edit&newstatus=Online", "Online", "pt-status-in", "Online", null, logout);
mw.util.addPortletLink( 'p-personal', linkprefix+user+subpage+"&action=edit&newstatus=Busy", "Busy", "pt-status-busy", "Busy", null, logout);
mw.util.addPortletLink( 'p-personal', linkprefix+user+subpage+"&action=edit&newstatus=Offline", "Offline", "pt-status-out", "Offline", null, logout);
if (location.href.indexOf("&action=edit&newstatus=") == -1) return; //Are we here to auto-edit the status?
//Get new status
var statusRegExp = /&action=edit&newstatus=(.*)/;
var status = statusRegExp.exec(location.href)[1];
//Modify the form
document.getElementById('wpTextbox1').value = status;
document.getElementById('wpSummary').value = "Status: "+status;
document.getElementById('wpMinoredit').checked = 'checked';
//Submit it!
document.getElementById('editform').submit();
});
dinc('Benutzer:ASM/quickedit.js');
importScript('User:Dr_pda/prosesize.js'); //[[User:Dr_pda/prosesize.js]]