MediaWiki:Gadget-HotCat.js:修订间差异
外观
删除的内容 添加的内容
new |
Maintenance script(留言 | 贡献) 维护 HotCat 加载范围和远程加载协议 |
||
| (未显示2个用户的2个中间版本) | |||
| 第1行: | 第1行: | ||
| ⚫ | |||
| ⚫ | |||
* 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; |
|||
| ⚫ | |||
} |
|||
window.HotCatLoader = true; |
|||
| ⚫ | |||
mw.loader.using( [ 'mediawiki.util', 'mediawiki.api' ] ).then( function () { |
|||
| ⚫ | |||
} ); |
|||
}() ); |
|||
2026年7月16日 (四) 16:59的最新版本
/**
* 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;
}
if ( !mw.config.get( 'wgIsProbablyEditable' ) || mw.config.get( 'wgNamespaceNumber' ) < 0 ) {
return;
}
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' );
} );
}() );