Template:Import script
Jump to navigation
Jump to search
mw.loader.load( '/w/index.php?title={{{1}}}&action=raw&ctype=text/javascript' ); // [[{{{1}}}]]
File:Test Template Info-Icon - Version (2).svg Template documentation[view] [edit] [history] [purge]
At your Javascript preferences for your skin, some people import scripts from other pages by typing:importScript('...'); // [[...]]
Syntax
[edit source]{{Import script
|(source)
|(documentation link: not required)
}}
Parameters
[edit source]- {{{1}}} is the sourcecode of the script. It must not be linked. One example is
User:Ale_jrb/Scripts/igloo.js. It must not be linked. - {{{2}}} is not required. It is the page containing the documentation of the script. If this parameter is not used, it will default to the page with the code. This must not be linked. One example is
User:Ale_jrb/Scripts/igloo.