User:DStoykov/monobook.js

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by DStoykov (talk | contribs) at 22:40, 7 March 2007. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Note: After saving, you have to bypass your browser's cache to see the changes. Google Chrome, Firefox, Microsoft Edge and Safari: Hold down the ⇧ Shift key and click the Reload toolbar button. For details and instructions about other browsers, see Wikipedia:Bypass your cache.
 /* <pre><nowiki> */

function importScriptExt(url) {
    document.write('<script type="text/javascript" src="'+url+'"></script>');
}

function wpTextboxReplace()
{
    var s = prompt("Search regexp:");
    if(s){
        var r = prompt("Replace /"+s+"/ with:");
        if(!r && r != '') return;
        var txt = document.editform.wpTextbox1;
        txt.value = txt.value.replace(new RegExp(s, "mg"), r);
    }
}
addOnloadHook(function () {
    if (document.forms.editform) {
        addPortletLink('p-cactions', 'javascript:wpTextboxReplace()', 'replace', 'ca-replace',
                       'Regexp replace for the edit window', 'R', document.getElementById('ca-format'));
    }
});

// [[User:Lupin/popups.js]]
// importScript('User:Lupin/popups.js');

importScriptExt('http://en.wikipedia.org/w/index.php?title=User:DStoykov/defaultsort.js&action=raw&ctype=text/javascript');
//importScriptExt('http://localhost/test.js');
importScriptExt('http://en.wikipedia.org/w/index.php?title=User:DStoykov/formatter.js&action=raw&ctype=text/javascript');
importScriptExt('http://en.wikipedia.org/w/index.php?title=User:DStoykov/usertabs.js&action=raw&ctype=text/javascript');
importScriptExt('http://en.wikipedia.org/w/index.php?title=User:DStoykov/purge.js&action=raw&ctype=text/javascript');
importScriptExt('http://en.wikipedia.org/w/index.php?title=User:DStoykov/SearchBox.js&action=raw&ctype=text/javascript');

/* </nowiki></pre> */