Wikipedia:WikiProject User scripts/Scripts/Replace: Difference between revisions
Content deleted Content added
new version by User:The Evil IP address |
Waldyrious (talk | contribs) fix warnings & deprecations (using Migration) |
||
Line 11:
var r = prompt("Replace /"+s+"/ with:");
r = r.replace(/\\n/g,"\n"); // unescape newlines
if (!r && r !== '') return;
txt.value = txt.value.replace(s_r, r);
return;
Line 23:
addOnloadHook(function () {
if (document.forms.editform) {
mw.util.addPortletLink('p-cactions', 'javascript:wpTextboxReplace()', 'Replace', 'ca-replace',
'Regexp replace for the edit window', 'R', document.getElementById('ca-history'));
}
|