User:Jack Merridew/monobook.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:Jack Merridew/monobook.css. |
importScript('User:Plastikspork/core.js');
importScript('User:Ohconfucius/MOSNUM dates.js'); //[[User:Ohconfucius/MOSNUM dates.js]]
$(function ()
{
if(document.forms.editform)
{
mw.util.addPortletLink('p-tb', 'javascript:Ohc_cite_dates_to_ISO()', 'CITE dates to ISO', 't-ISO', 'ISO day month', '', '');
}
});
importScript('user:js/urldecoder.js') // decodes external links to be internal, rewrites secure links to regular ones
urlDecoderIntLinks = true // helps me get rid of annoying underscores in internal links as well
importScript('User:Snottywong/diffconverter.js');
/*
importScript('User:Quarl/util.js');
importScript('User:Quarl/wikipage.js');
importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu');
importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css');
importScript('Wikipedia:WikiProject Deletion sorting/delsort.js');
DelsortConfig =
{
debugLevel : 0,
watchDelsortedLists : 1,
watchDelsortedAfd : 1,
shortcuts : ['Lists']
}
*/
importScript('User:Cameltrader/Advisor.js');
importScript('User:Ioeth/friendly.js');
// fork of Wikipedia:AutoEd/complete.js && Wikipedia:AutoEd/whitespace.js
//<source lang=javascript>
//Import individual modules for use
importScript('Wikipedia:AutoEd/unicodify.js'); // autoEdUnicodify() converts HTML entities to WikiText
importScript('Wikipedia:AutoEd/isbn.js'); // autoEdISBN() fixes ISBN syntax so that WikiMagic can work
// autoEdWhitespace() cleans up whitespace
function autoEdWhitespace(str) { //MAIN FUNCTION describes list of fixes
str = str.replace(/\t/g, " ");
str = str.replace(/^ ? ? \n/gm, "\n");
str = str.replace(/(\n\n)\n+/g, "$1");
str = str.replace(/== ? ?\n\n==/g, "==\n==");
str = str.replace(/\n\n(\* ?\[?http)/g, "\n$1");
str = str.replace(/^ ? ? \n/gm, "\n");
str = str.replace(/\n\n\*/g, "\n*");
str = str.replace(/[ \t][ \t]+/g, " ");
// str = str.replace(/([=\n]\n)\n+/g, "$1");
str = str.replace(/ \n/g, "\n");
//* bullet points
str = str.replace(/^([\*#]+) /gm, "$1");
str = str.replace(/^([\*#]+)/gm, "$1 ");
//==Headings==
// str = str.replace(/^(={1,4}) ?(.*?) ?(={1,4})$/gm, "$1$2$3");
return str;
}
importScript('Wikipedia:AutoEd/wikilinks.js'); // autoEdWikilinks() simplifies and shortens wikilinks where appropriate
importScript('Wikipedia:AutoEd/htmltowikitext.js'); // autoEdHTMLtoWikitext() converts HTML to wikitext
importScript('Wikipedia:AutoEd/headlines.js'); // autoEdHeadlines() fixes common headline errors and renames some headers
importScript('Wikipedia:AutoEd/unicodecontrolchars.js'); // autoEdUnicodeControlChars() converts HTML to wikitext
importScript('Wikipedia:AutoEd/templates.js'); // autoEdTemplates() cleans up templates
importScript('Wikipedia:AutoEd/tablestowikitext.js'); // autoEdTablestoWikitext() replaces HTML tables with wikitables
importScript('Wikipedia:AutoEd/extrabreaks.js'); // autoEdExtraBreaks() removes extra BR tags
importScript('Wikipedia:AutoEd/links.js'); // autoEdLinks() cleans up common link errors
importScript("User:GregU/dashes.js");
function autoEdFunctions() { //Activates individual modules when "auto ed" tab is clicked
var txt = document.editform.wpTextbox1;
txt.value = autoEdUnicodify(txt.value);
txt.value = autoEdISBN(txt.value);
txt.value = autoEdWhitespace(txt.value);
txt.value = autoEdWikilinks(txt.value);
txt.value = autoEdHTMLtoWikitext(txt.value);
txt.value = autoEdHeadlines(txt.value);
txt.value = autoEdUnicodeControlChars(txt.value);
txt.value = autoEdTemplates(txt.value);
txt.value = autoEdTablestoWikitext(txt.value);
txt.value = autoEdExtraBreaks(txt.value);
txt.value = autoEdLinks(txt.value);
txt.value = autoEdDashes(txt.value);
}
importScript('Wikipedia:AutoEd/core.js'); //Imports the "framework" script needed to make this function
//</source>
importScript('User:Smith609/toolbox.js');