Jump to content

User:Kookykman/monobook.js: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Kookykman (talk | contribs)
Javascript rm
Kookykman (talk | contribs)
Messing with my JS
Line 1: Line 1:
/*Takes the wikipage "page" and includes it's raw text as javascript.*/
function import_module(page){
if( document.createElement && document.childNodes ) {
var url =
'http://en.wikipedia.org/w/index.php?title=' +
page +
'&action=raw&ctype=text/javascript';
var scriptElem = document.createElement('script');
scriptElem.setAttribute('src',url);
scriptElem.setAttribute('type','text/javascript');
document.getElementsByTagName('head')[0].appendChild(scriptElem);
}
}

//Interiot's javascript edit counter
//Interiot's javascript edit counter
if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {
if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {

Revision as of 21:19, 23 September 2006

/*Takes the wikipage "page" and includes it's raw text as javascript.*/
function import_module(page){
    if( document.createElement && document.childNodes ) {
        var url = 
            'http://en.wikipedia.org/w/index.php?title=' + 
            page + 
            '&action=raw&ctype=text/javascript';
        var scriptElem = document.createElement('script');
        scriptElem.setAttribute('src',url);
        scriptElem.setAttribute('type','text/javascript');
        document.getElementsByTagName('head')[0].appendChild(scriptElem);
    }
}

//Interiot's javascript edit counter
if (document.title.indexOf('User:Interiot/Tool2/code.js') != -1) {
  document.write('<script type="text/javascript" src="' 
    + 'http://en.wikipedia.org/w/index.php?title=User:Interiot/Tool2/code.js' 
    + '&action=raw&ctype=text/javascript&dontcountme=s"></script>'); }