Template:Js: Difference between revisions
Appearance
Content deleted Content added
add documentation |
per edit request on talk page |
||
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
mw.loader.load('//en.wikipedia.org/w/index.php?title={{<includeonly>subst:</includeonly>urlencode:{{{1}}}}}&action=raw&ctype=text/javascript'); // [[{{{1}}}]]<noinclude> |
|||
{{documentation}}</noinclude> |
{{documentation}}</noinclude> |
Revision as of 18:31, 1 May 2013
mw.loader.load('//en.wikipedia.org/w/index.php?title=%7B%7B%7B1%7D%7D%7D&action=raw&ctype=text/javascript'); // [[{{{1}}}]]
This template should always be substituted (i.e., use {{subst:Js}} ). |
Usage
This template is for easy installation of JavaScript code — use {{subst:js|page_with_code.js}}
in your skin.js (see Wikipedia:Skin for details).
The above link should work for your current skin. These are the JavaScript file names left for reference:
Skin used | Skin JavaScript file |
---|---|
All skins | common.js |
Vector (default) | vector.js |
MinervaNeue | minerva.js |
Modern | modern.js |
MonoBook | monobook.js |
Timeless | timeless.js |
See also
- Template:Load user script, an alternative to this template. It allows for greater portability (e.g. use on other wikis).
This template has not been added to any categories. Please help out by adding categories to it so that it can be listed with similar templates. |