User:Danhash/global.js

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
// install [[en:User:Cacycle/wikEd]] in-browser text editor
/* Disabled 3/31/2020
(function ()
{
	var script = document.createElement ('script');
	script.src = '//en.wikipedia.org/w/index.php?title=User:Cacycle/wikEd.js&action=raw&ctype=text/javascript';
	script.async = true;
	document.getElementsByTagName ('head')[0].appendChild (script);
	 }
) ();
	
var wikEdConfig = {};  //Linkback: [[en:User:Cacycle/wikEd customization]]
wikEdConfig.showSourceButton = true; 
wikEdConfig.regExTypoFix = true;
wikEdConfig.showTableModeButton = true;
wikEdConfig.showUsingButton = true;
wikEdConfig.summaryUsing = '(using [[User:Cacycle/wikEd|wikEd]])';

wikEdConfig.comboPresetOptions = {};
wikEdConfig.comboPresetOptions.summary = [
'TEMPLATES',
 '+{{[[Template:XXXX|XXXX]]}}',
 ' ',
'DASHES/QUOTES/REFS/MOS:',
 '[[WP:REFPUNC|reference punctuation]]',
 '[[MOS:LQ|logical quotation]]',
 'single to double [[WP:MOS#Quotation marks|quotation marks]]',
 'curly to straight [[WP:MOS#Quotation marks|quotation marks]] and apostrophes',
 'fix [[WP:MOS#Quotation marks|quotation marks]]',
 'move quotation marks outside of links',
 'move quotation marks outside of bold',
 'fix [[MOS:DASH|dashes]]',
 'punctuation',
 'commas',
 'rewrite [[WP:MOS#Contractions|contractions]]',
 'remove "™" and "®" per [[Wikipedia:Manual of Style/Trademarks]]',
 '{{[[WP:Citation Needed|citation needed]]}}',
 'rm [[WP:WEASEL|weasel words]]',
 ' ',
 'TALK PAGES:',
 'reply',
 ' ',
 'REMOVE/REVERT:',
 'revert unexplained removal',
 'revert [[WP:V|unsourced]]',
 'revert [[WP:ELNO|external links]]',
 ' ',
 'LEAD',
 'rm "illegally"',
 'bold abbreviation in lead',
 ' ',
 'GENERAL CLEANUP/EDITING:',
 'rm [[WP:WHITE|whitespace]]',
 'rm [[WP:V|unsourced]]',
 'rm [[WP:V|unsourced]] material which appears to be [[WP:NOR|original research]]',
 'rm spam',
 'rm [[WP:REDNOT|red links]]',
 'copyedit',
 'update links',
 'fix links',
 'rm unsourced sentence',
 'rm entire [[WP:V|unsourced]] paragraph',
 ' ',
 'TECHNICAL:',
 'fix [[Wikipedia:Double redirects|double redirect]] after page move',
 'update [[WP:DEFAULTSORT|DEFAULTSORT]]',
 'update [[WP:HATNOTE|hatnote]] to use {{[[Template:About|about]]}}',
 'update [[WP:HATNOTE|hatnote]] to use {{[[Template:For|for]]}}',
 'update [[WP:HATNOTE|hatnote]] to use {{[[Template:Redirect|redirect]]}}',
 'Cleaned up using [[WP:AutoEd|AutoEd]]',
 '[[Wikipedia:RegExTypoFix|RegExTypoFix]] using [[User:Cacycle/wikEd|wikEd]]',
 '(using [[User:Cacycle/wikEd|wikEd]])',
 'edit wikEd RegEx defaults',
 'edit wikEd edit summaries',
 ' ',
 'IMAGE TEMPLATES:',
 '+{{ShouldBePNG}}',
 '+{{BadJPEG}}'
];
*/
 
/*
===Find/replace regex presets===
*/
/* Disabled 3/31/2020
wikEdConfig.comboPresetOptions.find = [
	'(“|”|″)', //match curly double quotes
	"(‘|’|′)", //match curly single quotes/apostrophes
	"(‘|’|′|')", //match all single quotes/apostrophes
	'(‘|’|′|\')((.){1,15})(‘|’|′|\')', //match apostrophes and curly single quotes
	'(“|”|″)((.){1,15})(“|”|″)',   //match curly double quotes
	'(\\.|,)"', //match period or comma before end of quote
	'\'',
	'-',
	' – ',
	'(™|®)'
	];
wikEdConfig.comboPresetOptions.replace = [
	'\\"$2\\"', //use in conjunction with the quote matching above to replace "wrong" quotes with "correct" quotes
	'"$1', //use in conjunction with the above RegEx to match period or comma before end of quote; this moves the period of comma to after the ending quotation mark
	'\n',
	'"',
	'\'',
	'–'
	];
 */
/* END wikEd */