MediaWiki:Gadget-HotCat.js:修订间差异

删除的内容 添加的内容
XP-jia​(留言 | 贡献)
new
 
Maintenance script​(留言 | 贡献)
维护 HotCat 加载范围和远程加载协议
 
(未显示2个用户的2个中间版本)
第1行:
/**▼
window.hotcat_translations_from_commons = true;▼
* Gadget: HotCat loader
*
* 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';
 
if ( window.HotCatLoader ) {
▲/*
return;
This imports the latest version of HotCat from Commons.
}
HotCat is a gadget to make changes to categories much easier.
 
Full documentation can be found at http://commons.wikimedia.org/wiki/Help:Gadget-HotCat
if ( !mw.config.get( 'wgIsProbablyEditable' ) || mw.config.get( 'wgNamespaceNumber' ) < 0 ) {
▲*/
return;
mw.loader.load( '//commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&action=raw&ctype=text/javascript' );▼
}
 
window.HotCatLoader = true;
▲ window.hotcat_translations_from_commons = true;
 
mw.loader.using( [ 'mediawiki.util', 'mediawiki.api' ] ).then( function () {
▲ mw.loader.load( 'https://commons.wikimedia.org/w/index.php?title=MediaWiki:Gadget-HotCat.js&oldid=1093305835&action=raw&ctype=text/javascript' );
} );
}() );