User:Fetchie Mankala/monobook.js

importScript('User:Tim_Song/afchelper4.js'); // Yet another AfC helper script v4. importScript('User:The_Earwig/afc-helper.js'); // AfC Redirect Helper script.

importScript('User:GoldenRing/generate-diffs.js');

importScript('User:Fox Wilson/delsort-monobook.js'); // Deletion sorting script WP:FWDS

//Interiot's javascript edit counter if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) { mw.loader.load('https://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js&action=raw&ctype=text/javascript'); } // User:Lupin/popups.js

mw.loader.load(            'https://en.wikipedia.org/w/index.php?title=User:Lupin/popups.js'             + '&action=raw&ctype=text/javascript&dontcountme=s'); importScript('User:Tim_Song/afchelper4.js'); importScript('Wikipedia:WikiProject User scripts/Scripts/Add LI menu'); importStylesheet('Wikipedia:WikiProject User scripts/Scripts/Add LI menu/css'); 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('User:Voice_of_All/Addtabs/monobook.js'); importScript('User:Misza13/statusChanger.js'); importScript('User:S/tags.js'); // User:Henrik/live-edit-counter importScript('User:Henrik/js/live-edit-counter.js'); popupFixDabs=true;

/*

wikEd
importScript('User:Cacycle/wikEd.js'); //i use this and it's awesome, duh var wikEdConfig = {}; wikEdConfig.showSourceButton = true; wikEdConfig.regExTypoFix = true; wikEdConfig.showTableModeButton = true; wikEdConfig.showUsingButton = true; wikEdConfig.summaryUsing = '(using wikEd)'; /*

Custom functions
wikEd = { config: { // define custom buttons [id, class, Tool tip, image url, width, height, alt text, onClick with parameters] button: { 100: ['WrapInCode', 'wikEdButton', 'Wrap selection in ', 'http://upload.wikimedia.org/wikipedia/commons/6/67/WikEd_logo.png', '16', '16', 'DIV', 'WikEdEditButton(this, this.id, null, WrapInCode);' ], 101: ['WrapInNowiki', 'wikEdButton', 'Wrap selection in ... ', 'https://upload.wikimedia.org/wikipedia/commons/5/5a/WikEd_nowiki.png', '16', '16', 'Test', 'WikEdEditButton(this, this.id, null, WrapInNowiki);' ] },       // define custom button bars [id outer, class outer, id inner, class inner, height, grip title, button numbers] buttonBar: { 'custom2': ['wikEdButtonBarCustom1', 'wikEdButtonBarCustom1',  'wikEdButtonsCustom1',  'wikEdButtonsCustom1',  44, 'My custom buttons', [100, 'br', 101] ] }   } } // define the function which is called upon clicking the custom button // this example code adds or removes div tags around the selected text function WrapInCode(obj) { // select the appropriate text change target (whole, selection, cursor, focusWord, focusLine, selectionWord, or selectionLine) //  focus... is the text under the cursor; ...Word and ...Line extend the target to the start/end of the word or line WikEdGetText(obj, 'selection, cursor'); if (obj.selection.plain != '') { obj.changed = obj.selection; } else { obj.changed = obj.cursor; } // make the changes to the plain target text if ( /&lt;code&gt;([\s\S]*?)&lt;\/code&gt;/i.test(obj.changed.plain) ) { // remove the previously added formatting obj.changed.plain = obj.changed.plain.replace(/&lt;code&gt;([\s\S]*?)&lt;\/code&gt;/gi, '$1'); } else { // add the text formatting obj.changed.plain = '&lt;code&gt;' + obj.changed.plain + '&lt;/code&gt;'; // Move spaces outside obj.changed.plain = obj.changed.plain.replace(/(&lt;code&gt;)( *)([\s\S]*?)( *)(&lt;\/code&gt;)/, '$2$1$3$5$4'); } // keep the changed text selected, needed to remove the formatting with a second custom button click obj.changed.keepSel = true; return; } function WrapInNowiki(obj) { // select the appropriate text change target (whole, selection, cursor, focusWord, focusLine, selectionWord, or selectionLine) //  focus... is the text under the cursor; ...Word and ...Line extend the target to the start/end of the word or line WikEdGetText(obj, 'selection, cursor'); if (obj.selection.plain != '') { obj.changed = obj.selection; } else { obj.changed = obj.cursor; } // make the changes to the plain target text if ( /&lt;nowiki&gt;([\s\S]*?)&lt;\/nowiki&gt;/i.test(obj.changed.plain) ) { // remove the previously added formatting obj.changed.plain = obj.changed.plain.replace(/&lt;nowiki&gt;([\s\S]*?)&lt;\/nowiki&gt;/gi, '$1'); } else { // add the text formatting obj.changed.plain = '&lt;nowiki&gt;' + obj.changed.plain + '&lt;/nowiki&gt;'; // Move spaces outside obj.changed.plain = obj.changed.plain.replace(/(&lt;nowiki&gt;)( *)([\s\S]*?)( *)(&lt;\/nowiki&gt;)/, '$2$1$3$5$4'); } // keep the changed text selected, needed to remove the formatting with a second custom button click obj.changed.keepSel = true; return; } /*

Default edit summaries
wikEdConfig.comboPresetOptions = {}; wikEdConfig.comboPresetOptions.summary = [ ' ', 'TALK PAGES:', 'reply', ' ', 'REMOVE/REVERT:', 'revert unexplained removal', 'revert unsourced', 'revert external links', ' ', 'GENERAL CLEANUP/EDITING:', 'rm whitespace', 'rm unsourced', 'rm spam', 'rm red links', 'copyedit', 'update links', 'fix links', 'rm unsourced sentence', 'rm entire unsourced paragraph', ' ', 'DASHES/QUOTES/REFS/MOS:', 'single to double quotation marks', 'curly to straight quotation marks', 'fix quotation marks', 'logical quotation', 'move quotation marks outside of links', 'fix dashes', 'punctuation', 'commas', 'reference punctuation', 'rewrite contractions', 'remove "™" and "®" per Manual of Style/Trademarks', '', 'rm weasel words', ' ', 'TECHNICAL:', 'fix double redirect after page move', 'update DEFAULTSORT', 'update hatnote to use ', 'update hatnote to use ', 'update hatnote to use ', 'Cleaned up using AutoEd', 'RegExTypoFix using wikEd', '(using wikEd)', 'edit wikEd RegEx defaults', 'edit wikEd edit summaries' ]; /*

Find/replace regex presets
wikEdConfig.comboPresetOptions.find = [ '(“|”)', "(‘|’)", "(‘|’|')", '\'', '-', ' – ', '(™|®)']; wikEdConfig.comboPresetOptions.replace = [ '\n', '"', '\'', '–']; /* END wikEd */ /*

AutoEd modules
//i use this importScript('Wikipedia:AutoEd/core.js'); importScript('Wikipedia:AutoEd/fullwidth.js'); importScript('Wikipedia:AutoEd/headlines.js'); importScript('Wikipedia:AutoEd/htmltowikitext.js'); importScript('Wikipedia:AutoEd/isbn.js'); importScript('Wikipedia:AutoEd/links.js'); importScript('Wikipedia:AutoEd/templates.js'); importScript('Wikipedia:AutoEd/unicodecontrolchars.js'); importScript('Wikipedia:AutoEd/unicodehex.js'); importScript('Wikipedia:AutoEd/unicodify.js'); importScript('Wikipedia:AutoEd/wikilinks.js'); //importScript('Wikipedia:AutoEd/dashes.js'); importScript("User:GregU/dashes.js"); //importScript('Wikipedia:AutoEd/extrabreaks.js'); //importScript('Wikipedia:AutoEd/tablestowikitext.js'); //importScript('Wikipedia:AutoEd/whitespace.js'); /*

AutoEd functions
function autoEdFunctions { //Activates individual modules when "auto ed" tab is clicked var txt = document.editform.wpTextbox1; txt.value = autoEdFullwidth(txt.value); txt.value = autoEdHeadlines(txt.value); txt.value = autoEdHTMLtoWikitext(txt.value); txt.value = autoEdISBN(txt.value); txt.value = autoEdLinks(txt.value); txt.value = autoEdTemplates(txt.value); txt.value = autoEdUnicodeControlChars(txt.value); txt.value = autoEdUnicodeHex(txt.value); txt.value = autoEdUnicodify(txt.value); txt.value = autoEdWikilinks(txt.value); txt.value = autoEdDashes(txt.value); //txt.value = autoEdExtraBreaks(txt.value); //txt.value = autoEdTablestoWikitext(txt.value); txt.value = autoEdWhitespace(txt.value); } autoEdClick = false; //for compatibility with wikEd /* END AutoEd */ /*

Gary King scripts
User:Gary King/Scripts importScript('User:Gary King/comments in local time.js'); //User:Gary King/comments in local time.js; a little buggy but very useful importScript('User:Gary_King/comment_highlighter.js'); //useful; Highlights recent comments yellow, while your own comments are highlighted in blue. (Requires User:Gary King/comments in local time.js for now). //importScript('User:Gary_King/prose_size.js'); //User:Gary_King/prose_size.js /* END Gary King scripts */ importScript('User:Bellezzasolo/Scripts/arb.js');