User:Tassedethe/monobook.js

popupFixDabs=true; popupFixRedirs=true; //changed 24 June 2017 //commented out 23 August 2018 //mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Topbanana/RLRL_SR_Utility.js&action=raw&ctype=text/javascript'); //importScript('User:Topbanana/RLRL_SR_Utility.js' );

//commented out lines 1 and 4 23 August 2018, added 7 May 2017 //LinkClassifierOnDemand=true; importScript('User:Anomie/linkclassifier.js'); // Linkback: User:Anomie/linkclassifier.js importStylesheet('User:Anomie/linkclassifier.css'); // Linkback: User:Anomie/linkclassifier.css //mw.util.addPortletLink('p-cactions', 'javascript:LinkClassifier.onDemand', 'Link Classifier');

//Commented out 7 May 2017 //LinkClassifierOnDemand=true; //importScript('User:Anomie/linkclassifier.js'); // Linkback: User:Anomie/linkclassifier.js //importStylesheet('User:Anomie/linkclassifier.css'); // Linkback: User:Anomie/linkclassifier.css //addOnloadHook(function{ //   mw.util.addPortletLink('p-cactions', 'javascript:LinkClassifier.onDemand', 'linkclassifier'); //});

// user:js/watchlist if (mw.config.get('wgCanonicalSpecialPageName') == 'Watchlist') importScript('user:js/watchlist.js');

/** * Unwatch from watchlist * * Add an "unwatch" link near each entry on the watchlist view (424). * * @source https://www.mediawiki.org/wiki/Snippets/Unwatch_from_watchlist * @author Krinkle * @revision 2014-12-17 */ mw.hook( 'wikipage.content' ).add( function ( $content ) {   // Only on Watchlist and not in the /edit or /raw mode    if ( mw.config.get( 'wgCanonicalSpecialPageName' ) !== 'Watchlist' || location.href.indexOf( '/edit' ) > 0 || location.href.indexOf( '/raw' ) > 0 ) {        return;    }    mw.loader.using( 'mediawiki.api.watch' ).done( function  { // Get the links var $wlHistLinks = $content.find( 'ul.special > li > a[href$="action=history"]');

$wlHistLinks.each( function {            var $unwatch,                $el = $( this ),                title = mw.util.getParamValue( 'title', this.href );

$unwatch = $el.clone .text( 'unwatch' ) .attr( 'href', function ( i, val ) {                   return val.replace( 'action=history', 'action=unwatch' );                } ) .on( 'click', function ( e ) {                   new mw.Api.unwatch( title )                        .done( function  { $unwatch.css( { pointerEvents: 'none', opacity: 0.5 } ); } )                       .fail( function  { $unwatch.off( 'click' ).append( ' (try again?)' ); } );                   e.preventDefault;                } ); $el.after( $unwatch ).after( ' | ' ); } );   } ); } );