User:Aaron Liu/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:Aaron Liu/common.css. |
// Add custom CharInsert entries
window.charinsertCustom = {
"Wiki markup": '<strong>+</strong> <em>+</em>',
};
importScript('User:Terasail/Edit Request Tool.js'); // Backlink: [[User:Terasail/Edit Request Tool.js]]
importScript('User:SuperHamster/CiteUnseen.js'); // Backlink: [[User:SuperHamster/CiteUnseen.js]]
mw.hook('convenientDiscussions.commentsReady').add(function () {
importScript('User:Pythoncoder/Scripts/voteSymbols.js'); // Backlink: [[User:Pythoncoder/Scripts/voteSymbols.js]]
});
importScript('User:Terasail/COI Request Tool.js'); // Backlink: [[User:Terasail/COI Request Tool.js]]
importScript('User:DannyS712/SATG.js'); // Backlink: [[User:DannyS712/SATG.js]]
importScript('User:Ingenuity/AntiVandal.js'); // Backlink: [[User:Ingenuity/AntiVandal.js]]
/// begin customized autoed/complete.js
importScript('Wikipedia:AutoEd/core.js'); // Backlink: [[Wikipedia:AutoEd/core.js]]
var AutoEd_baseurl = 'https://en.wikipedia.org/w/index.php?action=raw&ctype=text/javascript&title=Wikipedia:AutoEd/';
//Import individual modules for use
mw.loader.load(AutoEd_baseurl + 'unicodify.js'); // autoEdUnicodify() converts HTML entities to WikiText
mw.loader.load(AutoEd_baseurl + 'isbn.js'); // autoEdISBN() fixes ISBN syntax so that WikiMagic can work
mw.loader.load(AutoEd_baseurl + 'whitespace.js'); // autoEdWhitespace() cleans up whitespace
mw.loader.load(AutoEd_baseurl + 'wikilinks.js'); // autoEdWikilinks() simplifies and shortens wikilinks where appropriate
mw.loader.load(AutoEd_baseurl + 'htmltowikitext.js'); // autoEdHTMLtoWikitext() converts HTML to wikitext
mw.loader.load(AutoEd_baseurl + 'headlines.js'); // autoEdHeadlines() fixes common headline errors and renames some headers
mw.loader.load(AutoEd_baseurl + 'unicodecontrolchars.js'); // autoEdUnicodeControlChars() converts HTML to wikitext
mw.loader.load(AutoEd_baseurl + 'unicodehex.js'); // autoEdUnicodeHex() converts hex encoded characters to unicode
mw.loader.load(AutoEd_baseurl + 'templates.js'); // autoEdTemplates() cleans up templates
mw.loader.load(AutoEd_baseurl + 'tablestowikitext.js'); // autoEdTablestoWikitext() replaces HTML tables with wikitables
mw.loader.load(AutoEd_baseurl + 'extrabreaks.js'); // autoEdExtraBreaks() removes extra BR tags
mw.loader.load(AutoEd_baseurl + 'links.js'); // autoEdLinks() cleans up common link errors
mw.loader.load(AutoEd_baseurl + 'fullwidth.js');
importScript('User:Jerome Frank Disciple/curlyfixer.js');
importScript('User:Ohconfucius/dashes.js'); // Backlink: [[User:Ohconfucius/dashes.js]]
//importScript('User:Aaron Liu/NoPiper.js'); // Backlink: [[User:Aaron Liu/NoPiper.js]]
function autoEdFunctions() { //Activates individual modules when "auto ed" tab is clicked
var $textbox = $( '#wpTextbox1' );
var txt = $textbox.textSelection('getContents');
txt = autoEdUnicodify(txt);
txt = autoEdISBN(txt);
txt = autoEdWhitespace(txt);
txt = autoEdUnicodeHex(txt);
txt = autoEdWikilinks(txt);
txt = autoEdHTMLtoWikitext(txt);
txt = autoEdHeadlines(txt);
txt = autoEdUnicodeControlChars(txt);
txt = autoEdTemplates(txt);
txt = autoEdTablestoWikitext(txt);
txt = autoEdExtraBreaks(txt);
txt = autoEdLinks(txt);
txt = autoEdDashes(txt);
txt = autoEdFullwidth(txt);
txt = autoEdCurlyFixer(txt);
//txt = noPipe(txt);
if(txt===$textbox.textSelection('getContents')){ autoEdTag = ""; mw.notify("No changes required!"); }
else $textbox.textSelection('setContents', txt);
}
autoEdMinor = false;
/// end autoed
importScript('User:RedWarn/.js'); // Backlink: [[User:RedWarn/.js]]
autoDuplinks = true;
importScript('User:Aaron Liu/duplinks.js'); // Backlink: [[User:Aaron Liu/duplinks.js]]
importScript('User:Eejit43/scripts/redirect-helper.js'); // Backlink: [[User:Eejit43/scripts/redirect-helper.js]]
mw.loader.using( 'ext.wikiLove.defaultOptions', function() {
$.wikiLoveOptions.types.barnstar.subtypes.scripting = {
fields: [ 'header', 'message' ], // fields to ask for in form
option: 'Scripting Barnstar', // option listed in the select list
descr: "some 418 scripts you've got there",
header: 'Hooray scripts!', // header that appears at the top of the talk page post (optional)
image: 'Scripting Barnstar.png', // image for the item
};
} );
importScript('User:Nardog/ExamineMore.js'); // Backlink: [[User:Nardog/ExamineMore.js]]
importScript('User:Aaron Liu/MoveTop.js'); // Backlink: [[User:Aaron Liu/MoveTop.js]]
importScript('User:Enterprisey/delsort.js'); // Backlink: [[User:Enterprisey/delsort.js]]
importScript('User:Evad37/rater.js'); // Backlink: [[User:Evad37/rater.js]]
importScript('User:SD0001/deleted-metadata-link.js'); // Backlink: [[User:SD0001/deleted-metadata-link.js]]
importScript('User:CanonNi/Scripts/AlertAssistant.js'); // Backlink: [[User:CanonNi/Scripts/AlertAssistant.js]]
importScript('User:Aaron Liu/AliasPam.js'); // Backlink: [[User:Aaron Liu/AliasPam.js]]
importScript('User:TheTechie/Help Me Tool.js'); // Backlink: [[User:TheTechie/Help Me Tool.js]]
importScript('User:Aaron Liu/sandbox.js'); // Backlink: [[User:Aaron Liu/sandbox.js]]
importScript('User:Jeeputer/coordInserter.js'); // Backlink: [[User:Jeeputer/coordInserter.js]]
importScript('User:BilledMammal/MovePlus.js'); // Backlink: [[User:BilledMammal/MovePlus.js]]