手册:$wgLegacyJavaScriptGlobals

From MediaWiki.org
Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgLegacyJavaScriptGlobals and the translation is 56% complete.

Other languages:
English • ‎español • ‎français • ‎magyar • ‎polski • ‎中文 • ‎日本語
前端: $wgLegacyJavaScriptGlobals
Whether or not to assign configuration variables to the global window object.
引进版本:1.18.0 (r87856)
移除版本:仍在使用
允许的值:(布尔值)
默认值:true
其他设置: 按首字母排序 | 按功能排序

详情

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 ) ...

或:

if ( wgIsArticle ) ...

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

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

或:

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