User:Nihiltres/nothingthree-config.js

From Meta, a Wikimedia project coordination wiki

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.
$(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.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');
        // not using mobile CSS (yet) on Commons because I haven't imported it (yet)
        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.sidebar.collapse();
        nothingthree.sidebar.toggleTab();
    }
});