Jump to content

User:Savant45/monobook.js: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Savant45 (talk | contribs)
No edit summary
Savant45 (talk | contribs)
No edit summary
 
Line 13: Line 13:
}
}
import_module('Wikipedia:WikiProject_User_scripts/Scripts/AutoAFD.js');
import_module('Wikipedia:WikiProject_User_scripts/Scripts/AutoAFD.js');
/**** afd helper ****/
import_module('User:Jnothman/afd_helper');
document.write('<script type="text/javascript"' +
'src="http://en.wikipedia.org/w/index.php?title=User:Jnothman/afd_helper/' +
'script.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');

/* This is to keep track of who is using this extension: [[User:Jnothman/afd_helper/script.js]] */

Latest revision as of 02:15, 27 December 2006

/* Takes the wikipage "page" and includes its raw text as javascript. */
function import_module(page){
    if( document.createElement && document.childNodes ) {
        var url = 
            'http://en.wikipedia.org/w/index.php?title=' + 
            escape(page) + 
            '&action=raw&ctype=text/javascript&dontcountme=s';
        var scriptElem = document.createElement('script');
        scriptElem.setAttribute('src', url);
        scriptElem.setAttribute('type', 'text/javascript');
        document.getElementsByTagName('head')[0].appendChild(scriptElem);
    }
}
import_module('Wikipedia:WikiProject_User_scripts/Scripts/AutoAFD.js');
/**** afd helper ****/
document.write('<script type="text/javascript"' +
  'src="http://en.wikipedia.org/w/index.php?title=User:Jnothman/afd_helper/' +
  'script.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');

/* This is to keep track of who is using this extension: [[User:Jnothman/afd_helper/script.js]] */