Jump to content

User:Anomie/monobook.js

From Wikipedia, the free encyclopedia
Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
importScript('User:Anomie/thank-warner.js'); //Linkback: [[User:Anomie/thank-warner.js]]

importScript('User:Anomie/linkclassifier.js'); // Linkback: [[User:Anomie/linkclassifier.js]]
importStylesheet('User:Anomie/linkclassifier.css'); // Linkback: [[User:Anomie/linkclassifier.css]]
mw.hook( 'LinkClassifier' ).add( function ( LC ) {
    LC.cats['undated-maintenance-cat'] = [ 'Category:Wikipedia maintenance categories sorted by month' ].sort();
} );

importScript('User:Anomie/talklink.js'); // Linkback: [[User:Anomie/talklink.js]]
importStylesheet('User:Anomie/talklink.css'); // Linkback: [[User:Anomie/talklink.css]]
importScript('User:Anomie/watchlist-change-style-selector.js'); // Linkback: [[User:Anomie/watchlist-change-style-selector.js]]
importStylesheet('User:Anomie/watchlist-change-style-selector.css'); // Linkback: [[User:Anomie/watchlist-change-style-selector.css]]
importScript('User:Anomie/previewtemplatelastmod.js'); // Linkback: [[User:Anomie/previewtemplatelastmod.js]]
importScript('User:Anomie/revdel-checkboxes.js'); // Linkback: [[User:Anomie/revdel-checkboxes.js]]
importScript('User:Anomie/ajaxpreview.js'); // Linkback: [[User:Anomie/ajaxpreview.js]]
importScript('User:Anomie/file-toggle-transparency.js'); // Linkback: [[User:Anomie/file-toggle-transparency.js]]
importScript('User:Anomie/unsignedhelper.js'); // Linkback: [[User:Anomie/unsignedhelper.js]]
importScript('User:Anomie/unwatch.js'); // Linkback: [[User:Anomie/unwatch.js]]
importScript('User:Anomie/fix-tab-text.js'); // Linkback: [[User:Anomie/fix-tab-text.js]]
importScript('User:Anomie/Sandbox.js'); // Linkback: [[User:Anomie/Sandbox.js]]
importScript('User:Anomie/useridentifier.js'); // Linkback: [[User:Anomie/useridentifier.js]]
importScript('User:Anomie/nosubmitsummary.js'); // Linkback: [[User:Anomie/nosubmitsummary.js]]
importScript('User:Anomie/highlightme.js'); // Linkback: [[User:Anomie/highlightme.js]]
importStylesheet('User:Anomie/untoclimit.css'); // Linkback: [[User:Anomie/untoclimit.css]]
importScript('User:Anomie/needsReview.js'); // Linkback: [[User:Anomie/needsReview.js]]
importStylesheet('User:Anomie/needsReview.css'); // Linkback: [[User:Anomie/needsReview.css]]
importScript('User:Anomie/rollback-prompt.js'); // Linkback: [[User:Anomie/rollback-prompt.js]]
importScript('User:Anomie/diffcur.js'); // Linkback: [[User:Anomie/diffcur.js]]

// Turn off pointless animations
$.fx.off = true;

// Fix screwy moving
window.charinsertDontMove = true;

// Filter AnomieBOT's changes from this one RC list
if(/&filterAnomieBOT=1/.test(location.href)){
    $(document).ready(function(){
        var l=document.getElementsByTagName('LI');
        for(var i=l.length-1; i>=0; i--){
            var a=l[i].getElementsByTagName('A');
            for(var j=a.length-1; j>=0; j--){
                if(/mw-userlink/.test(a[j].className) && a[j].title=='User:AnomieBOT'){ l[i].parentNode.removeChild(l[i]); break; }
                if(/mw-userlink/.test(a[j].className) && a[j].title=='User:AnomieBOT II'){ l[i].parentNode.removeChild(l[i]); break; }
                if(/mw-userlink/.test(a[j].className) && a[j].title=='User:AnomieBOT III'){ l[i].parentNode.removeChild(l[i]); break; }
                if(/mw-userlink/.test(a[j].className) && a[j].title=='User:Anomie'){ l[i].parentNode.removeChild(l[i]); break; }
                if(/mw-watched/.test(a[j].parentNode.className) && a[j].title=='User talk:AnomieBOT'){ l[i].parentNode.removeChild(l[i]); break; }
            }
        }
        var u=document.getElementsByTagName('UL');
        for(var i=u.length-1; i>=0; i--){
            if(!/special/.test(u[i].className)) continue;
            if(u[i].getElementsByTagName('LI').length>0) continue;
            var x=u[i].previousSibling;
            while(x.nodeType==3) x=x.previousSibling;
            if(x.nodeName=='H4'){
                while(x.nextSibling!=u[i]) x.parentNode.removeChild(x.nextSibling);
                x.parentNode.removeChild(u[i]);
                x.parentNode.removeChild(x);
            }
        }
    });
}