User:SMcCandlish/common.js
Appearance
Code that you insert on this page could contain malicious content capable of compromising your account. If you import a script from another page with "importScript", "mw.loader.load", "iusc", or "lusc", take note that this causes you to dynamically load a remote script, which could be changed by others. Editors are responsible for all edits and actions they perform, including by scripts. User scripts are not centrally supported and may malfunction or become inoperable due to software changes. A guide to help you find broken scripts is available. If you are unsure whether code you are adding to this page is safe, you can ask at the appropriate village pump. This code will be executed when previewing this page. |
The accompanying .css page for this skin is at User:SMcCandlish/common.css. |
//Testing – temporary "holding pen" for imported scripts to try out:
/* From: http://medi.wiki.org/wiki/User:Remember_the_dot/Syntax_highlighter#Ignoring_unclosed_br_and_hr_tags
but docs warn "this will impact performance": */
syntaxHighlighterConfig = {
voidTags: ["br", "hr", "BR", "HR"],
};
/* Doc: http://en.wiki.x.io/wiki/User:SMcCandlish/TidyRefs */
mw.loader.load('//en.wiki.x.io/w/index.php?title=User:SMcCandlish/TidyRefs.js&action=raw&ctype=text/javascript');
/* Doc: http://en.wiki.x.io/wiki/User:Nardog/RefRenamer */
mw.loader.load('//en.wiki.x.io/w/index.php?title=User:Nardog/RefRenamer.js&action=raw&ctype=text/javascript');
/* Doc: http://en.wiki.x.io/wiki/User:Kaniivel/Reference_Organizer
I'm using a fork of it, described here: http://en.wiki.x.io/wiki/User_talk:Kaniivel/Reference_Organizer#Forked_it */
mw.loader.load('//en.wiki.x.io/w/index.php?title=User:Argenti_Aertheri/RefConsolidate_start.js&action=raw&ctype=text/javascript');
/* Trying this also from: mw:User:Remember_the_dot/Syntax_highlighter#Ignoring_unclosed_br_and_hr_tags */
syntaxHighlighterConfig = {
timeout: 30,
};
/* Adding Cat-a-Lot, tweaked for en.wikipedia; doc: http://commons.wikimedia.org/wiki/Help:Gadget-Cat-a-lot */
mw.loader.load('http://en.wiki.x.io/wiki/User:%D7%A7%D7%99%D7%A4%D7%95%D7%93%D7%A0%D7%97%D7%A9/cat-a-lot.js'); // Backlink: [[User:קיפודנחש/cat-a-lot.js]]
/* Adding reFill (fixes bare URL citations); doc: http://en.wiki.x.io/wiki/Wikipedia:ReFill */
mw.loader.load('http://meta.wikimedia.org/w/index.php?title=User:Zhaofeng_Li/Reflinks.js&action=raw&ctype=text/javascript');
/* http://en.wiki.x.io/wiki/User:DannyS712/AjaxRollbackSummary
enable custom edit summaries for rollback: */
mw.loader.load('User:DannyS712/AjaxRollbackSummary.js&action=raw&ctype=text/javascript');
//End testing.
// Javascript Wiki Browser variant of WP:AWB; see WP:Joeytje50/JWB for deets:
mw.loader.load('http://en.wiki.x.io/w/index.php?title=User:Joeytje50/JWB.js/load.js&action=raw&ctype=text/javascript');
// Detect broken Harvard citations (docs at User:Trappist the monk/HarvErrors):
mw.loader.load('http://en.wiki.x.io/w/index.php?title=User:Trappist the monk/HarvErrors.js&action=raw&ctype=text/javascript');
// Trappit's version is a less blunt an instrument than Ucucha's original.
// Ohconfucius's "MOSNUM dates": http://en.wiki.x.io/wiki/User:Ohconfucius/script/MOSNUM dates
mw.loader.load('http://en.wiki.x.io/w/index.php?title=User:SMcCandlish/MOSNUMdates.js&action=raw&ctype=text/javascript');
// OhConfucius's "ENGVARB": http://en.wiki.x.io/wiki/User:Ohconfucius/EngvarB
mw.loader.load('http://en.wiki.x.io/w/index.php?title=User:Ohconfucius/script/EngvarB.js&action=raw&ctype=text/javascript');
// Ohconfucius's "formatgeneral": http://en.wiki.x.io/wiki/User:Ohconfucius/script/formatgeneral
mw.loader.load('http://en.wiki.x.io/w/index.php?title=User:Ohconfucius/script/formatgeneral.js&action=raw&ctype=text/javascript');
// Ohconfucius's "flagcruft": http://en.wiki.x.io/wiki/User:Ohconfucius/script/flagcruft
mw.loader.load('http://en.wiki.x.io/w/index.php?title=User:Ohconfucius/script/flagcruft.js&action=raw&ctype=text/javascript');
// Ohconfucius's "Common Terms" delinker (also does some flagcruft cleanup): http://en.wiki.x.io/wiki/User:Ohconfucius/script/Common_Terms
mw.loader.load('http://en.wiki.x.io/w/index.php?title=User:Ohconfucius/script/Common_Terms.js&action=raw&ctype=text/javascript');
// "TidyCitations": http://en.wiki.x.io/wiki/User:SMcCandlish/TidyCitations
mw.loader.load('http://en.wiki.x.io/w/index.php?title=User:SMcCandlish/TidyCitations.js&action=raw&ctype=text/javascript');
// Highlight admin names – style tweaked in common.css
// - moved to http://meta.wikimedia.org/wiki/User:SMcCandlish/global.js
// Show some basic user info underneath usernames at the top of user and user talk pages
// - moved to http://meta.wikimedia.org/wiki/User:SMcCandlish/global.js
// Similar to the above but does it as icons to the side of the username; Not sure which I prefer:
// - moved to http://meta.wikimedia.org/wiki/User:SMcCandlish/global.js
// Turn on the "Other Projects Sidebar" features
// - moved to http://meta.wikimedia.org/wiki/User:SMcCandlish/global.js
// Copyvio Detector, in left sidebar
mw.loader.load( 'http://en.wiki.x.io/w/index.php?title=User:Ahecht/Scripts/CVD.js&action=raw&bcache=1&maxage=86400&ctype=text/javascript' ); // doc: [[User:Ahecht/Scripts/CVD]]
// lintHint - gives WP:LINT (HTML errors) analysis tool in button at top right
// - Doc: http://en.wiki.x.io/wiki/User:PerfektesChaos/js/lintHint
// - Config: http://en.wiki.x.io/wiki/Special:BlankPage/preferencesGadgetOptions#lintHint
// - Test arbitrary code or pages: http://en.wiki.x.io/wiki/Special:BlankPage/lintHint
mw.loader.load( "http://en.wiki.x.io/w/index.php?title=User:PerfektesChaos/js/lintHint/r.js&action=raw&bcache=1&maxage=86400&ctype=text/javascript" );
// Cleanup links to disambiguation pages (run it at the DAB page in question)
mw.loader.load( 'http://en.wiki.x.io/w/index.php?title=User:Qwertyytrewqqwerty/DisamAssist.js&action=raw&bcache=1&maxage=86400&ctype=text/javascript' );
// Highlight duplicate links within the same page; docs: User:Evad37/duplinks-alt
mw.loader.load( 'http://en.wiki.x.io/w/index.php?title=User:Evad37/duplinks-alt.js&action=raw&ctype=text/javascript');
// Selectively roll back all of a vandal's edits
mw.loader.load( 'http://en.wiki.x.io/w/index.php?title=User:Writ Keeper/Scripts/massRollback.js&action=raw&bcache=1&maxage=86400&ctype=text/javascript' );
// Get slightly more informative details about WikiData in watchlist entries:
// - moved to meta:User:SMcCandlish/global.js
// do some markup to edits by blocked users
// - moved to meta:User:SMcCandlish/global.js
// remove ugly styles from buttons:
$(".oo-ui-buttonInputWidget").removeClass("oo-ui-buttonInputWidget");
$(".oo-ui-buttonElement-button").removeClass("oo-ui-buttonElement-button");
// and checkboxes:
$(".oo-ui-checkboxInputWidget").removeClass("oo-ui-checkboxInputWidget");
// remove inflated field margins:
$(".oo-ui-fieldLayout-header").removeClass("oo-ui-fieldLayout-header");
// Add [[WP:Reflinks]] launcher in the toolbox on left
$.when(mw.loader.using(['mediawiki.util']), $.ready).then(function () {
mw.util.addPortletLink(
"p-tb", // toolbox portlet
"http://dispenser.homenet.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
)});
// Add a portlet to open user subpages to the personal toolbar, placed before the Preferences portlet:
// - This one will not work on sites that don't use English for "User:", etc.
mw.util.addPortletLink(
'p-personal',
'/wiki/Special:PrefixIndex/User:SMcCandlish',
'subpages',
'pt-subpages',
'Your subpages',
null,
'#pt-preferences'
);
// Install WP:AutoEd tools in "More" menu:
mw.loader.load( "http://en.wiki.x.io/w/index.php?title=Wikipedia:AutoEd/complete.js&action=raw&bcache=1&maxage=86400&ctype=text/javascript" );
//Automatically tick the "Move subpages" option when moving pages.
// - moved to meta:User:SMcCandlish/global.js
// Add link to watchlist template's /doc files:
// - moved to http://meta.wikimedia.org/wiki/User:SMcCandlish/global.js