Content deleted Content added
DemonDays64 (talk | contribs) yo no soy muy bueno con los scripts |
DemonDays64 (talk | contribs) Formatting |
||
Line 1:
// Make sure the utilities module is loaded (will only load if not already)
mw.loader.using(
document.editform.wpMinoredit.checked = true;
document.editform.wpSummary.value = 'Replaced smart quotes with dumb. Problem? [[User talk:DemonDays64|Tell me]].';
doaction('diff');
}
function setDumbQuotes() {
var singleQuoteRegex = {
find: /(‘|’)/g,
replace: "'"
}
var doubleQuoteRegex = {
find: /(“|”)/g,
replace: '"'
}
var originalPage = document.editform.wpTextbox1.value;
var modifiedPage = originalPage;
modifiedPage = modifiedPage.replace(singleQuoteRegex.find, singleQuoteRegex.replace);
modifiedPage = modifiedPage.replace(doubleQuoteRegex.find, doubleQuoteRegex.replace);
document.editform.wpTextbox1.value = modifiedPage;
setEditSummary();
}
}
|