Jump to content
MediaWiki

Manual:$wgLegacyJavaScriptGlobals: Difference between revisions

From mediawiki.org
Content deleted Content added
Line 6: Line 6:
|version_deprecated = 1.35.0
|version_deprecated = 1.35.0
|sha_deprecated = 0b23e1037d6cda746bb24a9479a702f66a5f5321
|sha_deprecated = 0b23e1037d6cda746bb24a9479a702f66a5f5321
|change_deprecated = 618030
|version_max = 1.37.0
|sha_removed = 99d4ad599596cf4bf57c1a76ea9d71af978a56b9
|change_removed = 678716
|section = Resource loader
|section = Resource loader
|range = (<translate><!--T:1--> boolean</translate>)
|range = (<translate><!--T:1--> boolean</translate>)
|default = <syntaxhighlight lang="php" inline>false</syntaxhighlight> (1.35(削除) + (削除ここまで))<br/>
|default = <syntaxhighlight lang="php" inline>false</syntaxhighlight> (1.35(追記) -1.36 (追記ここまで))<br/>
<syntaxhighlight lang="php" inline>true</syntaxhighlight> (1.18-1.34)
<syntaxhighlight lang="php" inline>true</syntaxhighlight> (1.18-1.34)
|summary = <translate><!--T:2--> Whether or not to assign configuration variables to the global window object.</translate>
|summary = <translate><!--T:2--> Whether or not to assign configuration variables to the global window object.</translate>

Latest revision as of 12:16, 21 April 2021

Removed: This feature was removed completely in version 1.37.0.
ResourceLoader: $wgLegacyJavaScriptGlobals
Whether or not to assign configuration variables to the global window object.
Introduced in version:1.18.0 (r87856)
Deprecated in version:1.35.0 (Gerrit change 618030; git #0b23e103)
Removed in version:1.37.0 (Gerrit change 678716; git #99d4ad59)
Allowed values:(boolean)
Default value:false (1.35-1.36)
true (1.18-1.34)
Other settings: Alphabetical | By function

Details

[edit ]

Whether or not to assign configuration variables to the global window object.

If this is set to false, old code using deprecated variables like:

if(window.wgRestrictionEdit)...

or:

if(wgIsArticle)...

will no longer work and needs to use mw.config instead. For example:

if(mw.config.exists('wgRestrictionEdit'))

or:

if(mw.config.get('wgIsArticle'))

AltStyle によって変換されたページ (->オリジナル) /