User:Nihiltres/nothingthree-config.js: Difference between revisions

From Wikimedia UK
Jump to navigation Jump to search
(Copied my settings from enwp, commented out admin functions)
 
(No difference)

Latest revision as of 19:37, 15 May 2012

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.specificAutoWatch();
        //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');
        //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.specificAutoWatch();
        //nothingthree.tabMove.protection();
        //nothingthree.tabMove.deletion();
        nothingthree.sidebar.collapse();
        nothingthree.sidebar.toggleTab();
        nothingthree.tabMove.watch();
    }
});