User:Nihiltres/nothingthree-config.js
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// Testing something…
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();
nothingthree.pageRC.activationTab();
}
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');
//Turn off jQuery animations, because this is generally a good idea on mobile devices…
jQuery.fx.off = true;
//now back to the "real" mobile additions:
//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.collapse();
nothingthree.sidebar.toggleTab();
nothingthree.tabMove.watch();
}
})