User:DemonDays64/Scripts/Dumb quotes.js: Difference between revisions

Content deleted Content added
Does htis work at all
Gave up on the basic thing, formatting
Line 1:
/** NOTE: To avoid changing the unusual styles of quotation marks such as «»
* set the variable basic to false.
* Do this by adding this line:
* basic = true;
* to your common.js file ([[Special:MyPage/common.js]]).
*/
// Make sure the utilities module is loaded (will only load if not already)
mw.loader.using('mediawiki.util', function () {
Line 12 ⟶ 6:
var modifiedPage;
var previousSummary;
var basic = true;
 
//add a tab on the left
Line 58 ⟶ 51:
makeAndRunRegex(/(“|”)/g, '"');
 
//‹Single guillemets›
if (!basic) {
makeAndRunRegex(/(‹|›)/g, "'");
//‹Single guillemets›
//«Double guillemets»
makeAndRunRegex(/(‹|›)/g, "'");
makeAndRunRegex(/(«|»)/g, '"');
//«Double guillemets»
makeAndRunRegex(/(«|»)/g, '"');
 
//‚Single down quotes‘
makeAndRunRegex(/‚/g, "'");
//„Double down quotes“
makeAndRunRegex(/„/g, '"');
 
//`Backticks´
makeAndRunRegex(/(`|´)/g, '"');
}
 
doEdit();
setEditSummary("ReplacedStandardized smartquote quotes with dumbstyles with [[User:DemonDays64/Scripts/Dumb quotes.js|script]] per [[MOS:CQ]]. Problem? [[User talk:DemonDays64|Tell the author]]", true);
showDiff();
}