User:Higor Douglas/monobook.js: Difference between revisions
Appearance
Content deleted Content added
←Created page with 'importScript('Wikipedia:WikiProject User scripts/Scripts/Replace');' |
No edit summary |
||
Line 1: | Line 1: | ||
/**** String replacement popup ****/ |
|||
importScript('Wikipedia:WikiProject User scripts/Scripts/Replace'); |
|||
function replace() |
|||
{ |
|||
var s = prompt("Search regexp?"); |
|||
if(s){ |
|||
var r = prompt("Replace regexp?"); |
|||
var txt = document.editform.wpTextbox1; |
|||
txt.value = txt.value.replace(new RegExp(s, "g"), r); |
|||
} |
|||
} |