Template:WithJs

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search
[edit] [purge] Template-info.svg Template documentation

Usage

Add to the top of pages which use javascript. The first argument should be the javascript file to use. The script must be in the MediaWiki namespace.

In the linked javascript file, you should add to the top of the script the following code:

document.getElementById("javascriptNotice") && document.getElementById("javascriptNotice").remove();

Examples

If you link to a page which is invalid, {{WithJs|MediaWiki:not_javascript}} and {{WithJs|NotInCorrectNamespace.js}} makes:


If you link to a page which does not exist, {{WithJs|MediaWiki:thisJavascriptDoesNotExist.js}} makes: