User:Quibik/monobook.js

// --- editing --- importScript('User:Apoc2400/refToolbarPlus.js'); // User:Apoc2400/refToolbarPlus.js importScript('User:Zocky/SearchBox.js'); // User:Zocky/SearchBox.js importScript('User:Anomie/ajaxpreview.js'); // User:Anomie/ajaxpreview.js importScript('User:Sander Säde/viewsource.js'); // User:Sander Säde/viewsource.js importScript('User:Symplectic Map/spell.js'); // User:Symplectic Map/spell.js

// --- display enhancements --- importScript('User:Pyrospirit/metadata/projectbanners.js'); // User:Pyrospirit/metadata/projectbanners.js //importScript('User:Anomie/linkclassifier.js'); // User:Anomie/linkclassifier.js //importStylesheet('User:Anomie/linkclassifier.css'); // User:Anomie/linkclassifier.css

// --- file descriptions --- importScript('User:Drilnoth/filescripts.js'); // See User:Drilnoth/filescripts.js/doc for details importScript('User:AWeenieMan/furme.js'); // User:AWeenieMan/furme.js

// --- article tools --- importScript('User:Pyrospirit/metadata/assesslinks.js'); // User:Pyrospirit/metadata/assesslinks.js importScript('User:Anomie/pagestats.js'); // User:Anomie/pagestats.js importScript('User:Dr pda/prosesize.js'); // User:Dr pda/prosesize.js importScript('User:Sander Säde/assess.js'); // User:Sander Säde/assess.js

// --- user information --- importScript('User:Anomie/useridentifier.js'); // User:Anomie/useridentifier.js importScript('User:Fran Rogers/dimorphism.js'); // User:Fran Rogers/dimorphism.js

importScript('User:Lupin/popups.js'); // User:Lupin/popups.js popupFixDabs = true; popupMaxWidth = 500;

// Adds external editing button $(function {	var editTab = document.getElementById("ca-edit");	if (!editTab) return;	var editURL = editTab.getElementsByTagName("a")[0].href;	mw.util.addPortletLink("p-cactions", editURL + "&externaledit=true", "EE", "ca-exted", "External editor", ""); });

/** * TemplateScript adds configurable templates and scripts to the sidebar, and adds an example regex editor. * @see https://meta.wikimedia.org/wiki/TemplateScript * @update-token */ $.ajax('//tools-static.wmflabs.org/meta/scripts/pathoschild.templatescript.js', { dataType:'script', cache:true }).then(function {	pathoschild.TemplateScript.add([ // A tool script to correct dash usage in articles. {			name: 'Hyphens → en dash', script: function(editor) { editor .replace(/([^\d\w-]p*\d+|\d+th)\s*(?:[-–—]+|–|&mdash;)\s*(\d+[^\d\w-]|present|\d+th)/ig, '$1–$2') .replace(/(january|jan|february|feb|march|mar|april|apr|may|june|jun|july|jul|august|aug|september|sept|october|oct|november|nov|December|dec)(?:[-–—]+|–|&mdash;)(january|jan|february|feb|march|mar|april|apr|may|june|jun|july|jul|august|aug|september|sept|october|oct|november|nov|December|dec)/gi, '$1–$2') .replace(/\s+(?:[-–—]+|–|&mdash;)\s+/g, ' – ') .setEditSummary('Corrected dashes.') .clickDiff; }		},		{			name: 'en dash (basic)', script: function(editor) { editor .replace(/\s+(?:[-–—]+|–|&mdash;)\s+/g, ' – '); }		},		{			name: 'name pairs', script: function(editor) { editor .replace(/([A-Z][a-z]+)-([A-Z][a-z]+)/g, '$1–$2') .setEditSummary('Corrected dashes in name pairs.') .clickDiff; }		}	]); });

// AutoEd importScript('Wikipedia:AutoEd/core.js'); //Imports the "framework" script needed to make this function

autoEdTag = "Fixing dashes using dashes.js and AutoEd";

//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 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'); // autoEdDashes corrects dashes

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 = 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); }