Template:Install user script/doc: Difference between revisions

Content deleted Content added
m importScript() vs mw.loader.load(): Typo fixing, replaced: the the → the
In section "importScript() is not deprecated", link from "some confusion" to User talk:Enterprisey/script-installer#Confusing history of importScript
 
(One intermediate revision by one other user not shown)
Line 16:
== 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>
 
== importScript() is not deprecated ==
 
There is [[User talk:Enterprisey/script-installer#Confusing history of importScript|some confusion]] about whether or not importScript() is deprecated. The answer is that it is '''not''' deprecated.
 
In 2015, importScript() was [[gerrit:c/mediawiki/core/+/203293|deprecated for one week]], and then [[gerrit:c/mediawiki/core/+/206078/|the action was reversed]]. In 2022, a [[gerrit:c/mediawiki/core/+/820828|bug causing importScript() to not work for mobile users]] was fixed. As of 2022, the latest statement by software engineers on the deprecation is [[phab:T27845#8135189]], which states {{TQ|For local imports, call importScript(). This is not, and never was, deprecated. For cross-wiki and other less trivial use cases, call mw.loader.load().}}