User:Nihiltres/vector.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:Nihiltres/vector.css. |
//Functions are defined at [[User:Nihiltres/nothingthree.js]], as created or collected by Nihiltres.
importScript("User:Nihiltres/nothingthree.js");
//ENABLE STUFF FOR USE HERE
addOnloadHook(function() {
if (!nothingthree.util.isMobile() ) { //in the usual case…
//First, fix some links, using linkFix
nothingthree.util.linkFix('pt-preferences', 'Preferences');
nothingthree.util.linkFix('pt-watchlist', 'Watchlist');
nothingthree.util.linkFix('pt-mytalk', 'Talk');
nothingthree.util.linkFix('pt-mycontris', 'Contributions');
//Second, add the tabs as desired
nothingthree.tabAdd.log();
nothingthree.tabAdd.sandbox();
nothingthree.tabAdd.purge();
//Some miscellaneous additions…
nothingthree.watchMediawikiSpaceEdits();
nothingthree.tabMove.protection();
nothingthree.tabMove.deletion();
nothingthree.sidebar.toggleTab();
nothingthree.sidebar.remember();
nothingthree.tops.toggleTab();
nothingthree.tabMove.watch();
}
else { //if it's a mobile browser as defined by nothingthree.util.isMobile() …
//Mobile-specific CSS! (Mobile-specific JS is handled here.)
importStylesheet('User:' + wgUserName + '/vector-ipod.css');
//the next bit *would be* importScript('User:' + wgUserName + '/vector-ipod.css'); …
nothingthree.util.linkFix('pt-preferences', 'Preferences');
nothingthree.util.linkFix('pt-watchlist', 'Watchlist');
nothingthree.util.linkFix('pt-mytalk', 'Talk');
nothingthree.util.linkFix('pt-mycontris', 'Contributions');
//Second, add the tabs as desired
nothingthree.tabAdd.log();
nothingthree.tabAdd.sandbox();
nothingthree.tabAdd.purge();
//Some miscellaneous additions…
nothingthree.watchMediawikiSpaceEdits();
nothingthree.tabMove.protection();
nothingthree.tabMove.deletion();
nothingthree.sidebar.collapse();
nothingthree.sidebar.toggleTab();
}
});