MediaWiki:Gadget-HotCat.js:修订间差异
删除的内容 添加的内容
Maintenance script(留言 | 贡献) 固定上游版本并补全依赖 |
Maintenance script(留言 | 贡献) 维护 HotCat 加载范围和远程加载协议 |
||
第1行:
/**
* Gadget:
*
* Loads the pinned Wikimedia Commons HotCat gadget for logged-in users on
* editable pages. The actual implementation stays upstream; this local page
* keeps loading scope and dependency handling explicit.
*▼
*/
( function () {
'use strict';
return;
if ( !mw.config.get( 'wgIsProbablyEditable' ) || mw.config.get( 'wgNamespaceNumber' ) < 0 ) {
return;
}▼
▲if (!window.HotCatLoader) {
▲ window.HotCatLoader = true;
▲ window.hotcat_translations_from_commons = true; // 允许从 Commons 获取翻译
▲ mw.loader.using(['mediawiki.util', 'mediawiki.api']).then(function () {
} );
▲ mw.loader.load('//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&oldid=1093305835&action=raw&ctype=text/javascript');
}()
▲}
| |||