Jump to content

User:Jmcgnh/common.js

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jmcgnh (talk | contribs) at 06:44, 12 November 2018 (Script Installer: Added User:Markhurd/hidetopcontrib.js). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
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.
// 2017-08-16 alternate hostname for dispenser tools: toolserver.org

// The entries here have been gathered from a number of different sources, best sought by looking for the tool name

// Because there seemed to be an unwanted interaction with page curation tools, I placed all of the addPortletLink calls
// inside the scope of the when-ready-done block originally provided for Lourdes/PageCuration.js

// This version was tested as working on 2017-08-29

$.when( mw.loader.using( ['mediawiki.util'] ), $.ready ).done( function() {
	
	// add to toolbox instead of menubar // Linkback: [[User:Lourdes/PageCuration.js]]

  mw.util.addPortletLink(
    'p-tb',
    mw.util.getUrl('Special:NewPagesFeed'),
    'Page Curation',
    'pt-pagecuration',
    'View Special:New Pages using the Page Curation tool',
    null,
    '#pt-preferences'
  );

mw.util.addPortletLink ('p-tb', wgServer+wgArticlePath.replace("$1", "Special:PrefixIndex/"+wgPageName+"/"), 'Subpages');

mw.util.addPortletLink ('p-tb', wgServer+wgArticlePath.replace("$1", "Special:WhatLinksHere/"+wgPageName+"?namespace=0"), 'Links from articlespace');

mw.loader.load( "https://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript" );

mw.util.addPortletLink ('p-tb', "http://toolserver.org/~dispenser/cgi-bin/dab_solver.py/" + mw.config.get('wgPageName'), 'Dab solver');

mw.util.addPortletLink ('p-tb', "http://toolserver.org/~dispenser/cgi-bin/dablinks.py?page=" + mw.config.get('wgPageName'), 'Dablinks');

mw.util.addPortletLink ('p-tb', "https://tools.wmflabs.org/dplbot/dab_fix_list.php?title=" + mw.config.get('wgPageName'), 'Dab fix list');

mw.util.addPortletLink ('p-tb', "http://toolserver.org/~dispenser/cgi-bin/webchecklinks.py?page=" + mw.config.get('wgPageName'), 'Checklinks');

mw.util.addPortletLink ('p-tb', "http://sumsearch.org/cite/", 'Cite maker1');

mw.util.addPortletLink(
        "p-tb",
        "https://tools.wmflabs.org/copyvios/?lang=" + mw.config.get("wgContentLanguage") + "&project=" + mw.config.get("wgSiteName").toLowerCase() + "&title=" + encodeURIComponent(mw.config.get("wgPageName")),
        "Copyvio check",
        "t-copyvio-check",
        "Check this page for copyright violations"
    );
    
});

importScript( 'User:Equazcion/ScriptInstaller.js' ); // Backlink: [[User:Equazcion/ScriptInstaller.js]]

importScript( 'User:Jcgoble3/SectionInput.js' ); // Backlink: [[User:Jcgoble3/SectionInput.js]]

importScript('User:Frietjes/findargdups.js'); // Linkback: [[User:Frietjes/findargdups]]

// 2018-11-12 My version of this script has developed a problem, disabling import for now; will try MarkHurd version
// importScript('User:Jmcgnh/hidetopcontribs.js'); // Linkback: [[User:Jmcgnh/hidetopcontribs.js]] w/ attribution to [[User:Sparkla/hidetopcontribs.js]]

importScript("User:Writ Keeper/Scripts/teahouseUtility.js"); // Gives one-click option to add Teahouse invitation or talkback to a user

importScript( 'User:Evad37/MoveToDraft.js' ); // Backlink: [[User:Evad37/MoveToDraft]]

// Link classifier - don't need it to run all the tinme
LinkClassifierOnDemand=true; // would like it to normally be "true", but can't get that to work yet
importScript('User:Jmcgnh/linkclassifier-list-self-redirects.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-tb', '', 'Link Classifier');
    $(el).click(function() {
    	LinkClassifier.onDemand();
    } );
} );
importScript('User:Enterprisey/easy-brfa.js'); //Linkback: [[User:Enterprisey/easy-brfa.js]] Added by Script installer
importScript('User:Enterprisey/reply-link.js'); //Linkback: [[User:Enterprisey/reply-link.js]] Added by Script installer
importScript('User:Markhurd/hidetopcontrib.js'); //Linkback: [[User:Markhurd/hidetopcontrib.js]] Added by Script installer