User:Anomie/monobook.js

Source: 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/unattributed-image-finder.js'); // Linkback: [[User:Anomie/unattributed-image-finder.js]]
//importStylesheet('User:Anomie/unattributed-image-finder.css'); // Linkback: [[User:Anomie/unattributed-image-finder.css]]
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]]

// Notify me when I look at a page with an unattributed image
window.UnattributedImageFinderAlert = true;

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

// Fix screwy moving
window.charinsertDontMove = true;
(function(){
    // Sigh. Ordering.
    var x = $('#editpage-specialchars');
    if ( x && !x.parent().hasClass( 'mw-editTools' ) ) {
        x.prependTo( '.mw-editTools' );
    }
})();

// 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);
            }
        }
    });
}

// I need a break.
if((mw.config.get('wgCanonicalNamespace')!='' || mw.config.get('wgAction')!='view') && new Date()<Date.parse("June 11, 2008 18:00:00")){
    (function(){
        if(document.body) document.body.style.display='none';
        else setTimeout(arguments.callee, 100);
    })();
}