Template:Install user script/doc: Difference between revisions

Content deleted Content added
Created page with '{{Documentation subpage}} {{Subst only}} {{template shortcuts|iusc}} <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> This templ...'
 
No edit summary
Line 4:
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
 
This template is used to install [[WP:US|user scripts]] that reside on the English Wikipedia. It is to be used primarily on [[Special:MyPage/Commoncommon.js]] or [[Special:MyPage/Skinskin.js]]. It adds the necessary <code>importScript</code> line along with a [[WP:Backlink|backlink]].
 
== Usage ==
Line 11:
<code><nowiki>{{subst:iusc| script_path }}</nowiki></code>
*Replace <code>script_path</code> with the the full .js page name of the user script to be installed.
*The template '''must''' but [[WP:SUBST|substituted]] (<code>subst:</code>), or else it won't work.
 
== Example ==
<code><nowiki>{{subst:iusc|User:TheDJ/sharebox.js}}</nowiki></code>
*'''Produces:''' <code><nowiki>importScript('User:TheDJ/sharebox.js'); // Backlink: [[User:TheDJ/sharebox.js]]</nowiki></code>
 
<includeonly>