Jump to content

User:Dank/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.
LinkClassifierOnDemand=true;
importScript('User:Anomie/linkclassifier.js'); // Linkback: [[User:Anomie/linkclassifier.js]]
importStylesheet('User:Anomie/linkclassifier.css'); // Linkback: [[User:Anomie/linkclassifier.css]]

$.when( mw.loader.using( 'mediawiki.util' ), $.ready ).then( function() {
    var el = mw.util.addPortletLink('p-cactions', '', 'Link Classifier');
    $(el).on('click', function(e) {
        LinkClassifier.onDemand();
        e.preventDefault();
    } );
} );
importScript('User:Phlsph7/HighlightUnreferencedPassages.js'); // Backlink: [[User:Phlsph7/HighlightUnreferencedPassages.js]]
//Dealing with Malnadachbot
//#SmartWatchlistOptions {display:none ! important;}
//importScript('User:UncleDouggie/smart_watchlist.js'); // Backlink: [[User:UncleDouggie/smart_watchlist]]
importScript('User:Shubinator/DYKcheck.js'); //DYKcheck tool: [[User:Shubinator/DYKcheck.js]]
importScript('User:Ucucha/HarvErrors.js'); // Backlink: [[User:Ucucha/HarvErrors.js]]
importScript('User:Headbomb/unreliable.js'); // Backlink: [[User:Headbomb/unreliable.js]]
importScript('User:Gary/nominations viewer.js'); // [[Wikipedia:Nominations Viewer]]
//importScript('User:Dr pda/prosesize.js'); //[[User:Dr pda/prosesize.js]]
//window.popupStructure='lite';

//importScript( 'User:Enterprisey/reply-link.js' ); // Backlink: [[User:Enterprisey/reply-link.js]]


/*
importScript('User:Dank/tempeasyblock.js'); //[[User:Animum/easyblock.js]]
ebPrefs = {
    loadPageOnSubmit : true,
    watchlistEnabled : true,
    displayStatus : false
};

importScript('User:Ale_jrb/Scripts/csdhelper.js');  //[[User:Ale_jrb/Scripts]]
var notifyByDefaultNew = true;
var redirectAfterDel = 'https://en.wikipedia.org/wiki/Category:Candidates_for_speedy_deletion_as_spam';
var myDeleteReasons = new Array(['G11', 'promotional text']);
//var overwriteDeleteReasons = true;
*/

//importScript('User:Anomie/linkclassifier.js');
/*
var phrases = {'wishy': '"Wishy" is a very silly word; don\'t use it.', 'washy': '"Washy" is even worse.'};
var argstring = ' ' + Object.keys(phrases).join(" ");
if (mw.config.get( 'wgAction' ) === 'view')
mw.loader.using(['jquery.highlightText', 'jquery.tipsy'], function() {
    mw.util.$content.highlightText(argstring);
    $('.highlight').tipsy({
        title: function() { 
        	return phrases[$(this).text()];
        }
    });
});
*/
/* wishy and washy a b
/*   
if (mw.config.get( 'wgAction' ) === 'view')
mw.loader.using(['jquery.highlightText', 'jquery.tipsy'], function() {
    mw.util.$content.highlightText(' additionally disperse however located respectively situated subsequently');
    $('.highlight').tipsy({
        title: function() { 
        if ($(this).text()==='additionally') m=
'"additionally" is often redundant.'; else if ($(this).text()==='disperse') m=
'Dispersed means "scattered"; disbursed means "paid out".'; else if ($(this).text()==='however') m=
'"however" usually means that what follows negates or lessens the significance of what precedes the word. If you use it to mean other things, then your readers won\'t be sure of the stronger meaning when you need the stronger meaning.'; else if ($(this).text()==='located') m =
'"located" is often redundant.'; else if ($(this).text()==='respectively') m=
'Try to reword without "respectively".'; else if ($(this).text()==='situated') m=
'"situated" is often redundant.'; else if ($(this).text()==='subsequently') m=
'"subsequently" is often redundant.';
            return m;
        }
    });
});
*/
// additionally however located situated subsequently dispersed
// formerly:  return 'See [[User:Dank/SomePage#' + $(this).text() + ']]';

//importScript('User:Ucucha/duplinks.js'); // [[User:Ucucha/duplinks]]

/*
importScript("User:Dank/tempeasyblock.js");
ebPrefs = {
    loadPageOnSubmit : true,
    watchlistEnabled : true,
    displayStatus : false
};
*/

/*
importScript('User:AzaToth/morebits.js');
span.updatedmarker {
    background-color: transparent;
    color: #006400;
}
.mw-special-Watchlist strong.mw-watched a {
    font-weight: bold;
}

// Add [[WP:Reflinks]] launcher in the toolbox on left
$(function () {
 mw.util.addPortletLink(
  "p-tb",     // toolbox portlet
  "http://toolserver.org/~dispenser/cgi-bin/webreflinks.py/" + mw.config.get('wgPageName') 
   + "?client=script&citeweb=on&overwrite=&limit=20&lang=" + mw.config.get('wgContentLanguage'),
  "Reflinks"  // link label
)});

//importScript('User:Ucucha/HarvErrors.js');
//importScript("User:Ucucha/autofc.js"); // [[User:Ucucha/autofc]]
importScript('User:Ucucha/duplinks.js');
importScript("User:Ohconfucius/script/formatgeneral.js");
importScript('User:Dr pda/prosesize.js'); //[[User:Dr pda/prosesize.js]]
importScript("User:GregU/dashes.js");
importScript('User:Lenore/autolink.js'); // [[User:Lenore/autolink]]
importScript('User:Dr pda/editrefs.js'); //[[User:Dr pda/editrefs.js]]
importScript('User:Dank/tempeasyblock.js');


//importScript("User:Dank/Scripts/csd.js");

//importScript('User:AzaToth/twinklexfd.js');
//importScript('User:AzaToth/twinklewarn.js');
//importScript('User:AzaToth/twinklespeedy.js');
*/
/*
$( function($) {
   var portletlink = mw.util.addPortletLink('p-tb', '#', 'Highlight duplicate links', 'ca-findduplicatelinks');
    $(portletlink).click( function(e) {
        e.preventDefault();
        // create a separate div surrounding the lead
        // first get the element immediately surrounding the article text. Unfortunately, MW doesn't seem to provide a non-fragile way for that.
        var content = ".mw-content-ltr";
        $(content).prepend(document.createElement('div'));
        var lead = $(content).children()[0];
        $(lead).attr('id', 'lead');
        $(content).children().each( function() {
            if(this.nodeName.toLowerCase() == 'h2') {
                return false;
            }
            if($(this).attr('id') != 'lead') {
                $(lead).append(this);
            }
            return true;
        });
       
        // detect duplicate links
        mw.util.addCSS(".duplicate-link { border: 1px solid red; }");
        var finddups = function() {
            var href = $(this).attr('href');
            if(href != undefined && href.indexOf('#') != 0) {
                if(seen[href]) {
                    $(this).addClass("duplicate-link");
                }
                else {
                    seen[href] = true;
                }
            }
            return true;
        };
        // array to keep track of whether we've seen a link before
        var seen = [];
        mw.util.$content.find('p a').not('#lead *, .infobox *, .navbox *').each(finddups);
        var seen = [];
        mw.util.$content.find('#lead p a').not('.infobox *, .navbox *').each(finddups);
    });
});
*/