User:Scott/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:Scott/common.css. |
// Add "Subpages" link to left of page navigation
mw.util.addPortletLink ('p-tb', mw.config.get('wgServer')+mw.config.get('wgArticlePath').replace("$1", "Special:PrefixIndex/"+mw.config.get('wgPageName')+"/"), 'Subpages');
// Add a link to the User Analysis Tool to the toolbox
importScript('User:Scott/toolbox-useranalysis.js');
// Use the Cat-A-Lot tool from Commons here - [[User:קיפודנחש#Cat-A-Lot]]
importScript('User:קיפודנחש/cat-a-lot.js');
// Identify common formatting and stylistic issues while editing - [[User:Cameltrader/Advisor]]
importScript('User:Cameltrader/Advisor.js');
// Prompt for an edit summary when clicking a rollback link
importScript('User:Ilmari_Karonen/rollbacksummary.js');
// Add various DNS-type utility URLs to IP editor pages
importScript('User:East718/voa.js');
// Style the Talk tab based on the status of the talk page
importScript('User:Anomie/talklink.js');
importStylesheet('User:Anomie/talklink.css');
// Show some metadata about users on User: or User talk: pages - [[User:Please stand/User info]]
// Not working at present
// importScript("User:PleaseStand/userinfo.js");
/* my CSS */
importStylesheet('User:Scott/Styles/contributions.css' );
importStylesheet('User:Scott/Styles/history.css' );
importStylesheet('User:Scott/Styles/toolbox.css' );
importStylesheet('User:Scott/Styles/watchlist.css' );
// Add "diff only" links to history navigation on diff views
function diff_only_buttons() {
handle_diff('differences-prevlink');
handle_diff('differences-nextlink');
function handle_diff(diff_id) {
var link = document.getElementById(diff_id);
if (link === null) { return false; }
var diff_only = document.createElement('a');
diff_only.id = diff_id;
diff_only.href = link.href + '&diffonly=1';
diff_only.appendChild(document.createTextNode(' (diff only)'));
link.parentNode.appendChild(diff_only);
return true;
}
}
$(diff_only_buttons);
/* Show changes and preview at the same time above the edit window. Hot diggity.
https://en.wikipedia.org/w/index.php?title=Wikipedia:Village_pump_(technical)&oldid=798191866#Show_Preview_and_Show_Changes_on_a_single_button */
mw.loader.load("https://en.wikipedia.org/w/index.php?title=User:Writ_Keeper/Scripts/previewAndDiff.js&action=raw&ctype=text/javascript");
importScript('User:Enterprisey/link-deleted-revs.js');
importScript('User:Nardog/MoveHistory.js'); // Backlink: [[User:Nardog/MoveHistory.js]]
importScript('User:Nardog/CopySectLink.js'); // Backlink: [[User:Nardog/CopySectLink.js]]
importScript('User:Nardog/SmartDiff.js'); // Backlink: [[User:Nardog/SmartDiff.js]]
importScript('User:Nardog/Consecudiff.js'); // Backlink: [[User:Nardog/Consecudiff.js]]