MediaWiki:Gadget-Purge.js:修订间差异
跳转到导航
跳转到搜索
创建页面,内容为“→* * 刷新缓存按钮 * 搬運自 https://zh.wikipedia.org/w/index.php?title=User:%E6%A1%90%E7%94%9F%E3%81%93%E3%81%93/js/Gadget-purge.js&oldid=69943550 * @author [[zhwp:User:桐生ここ]]: (function($, mw) { if ( mw.config.get( 'wgIsArticle' ) == true ) { if ( ( mw.config.get( 'wgMFAmc' ) == true ) && ( $( '#p-tb' ).length != 0 ) ) { $( '#p-tb' ).append( '<li class="toggle-list-item"><a class="toggle-list-item__anchor" href="' + $(loca…” |
去掉wgULS |
||
第7行: | 第7行: | ||
if ( mw.config.get( 'wgIsArticle' ) == true ) { | if ( mw.config.get( 'wgIsArticle' ) == true ) { | ||
if ( ( mw.config.get( 'wgMFAmc' ) == true ) && ( $( '#p-tb' ).length != 0 ) ) { | if ( ( mw.config.get( 'wgMFAmc' ) == true ) && ( $( '#p-tb' ).length != 0 ) ) { | ||
$( '#p-tb' ).append( '<li class="toggle-list-item"><a class="toggle-list-item__anchor" href="' + $(location).attr( 'origin' ) + '/wiki/Special:Purge/' + mw.config.get( 'wgPageName' ) + '" data-mw="interface"><span class="mw-ui-icon mw-ui-icon-reload"></span> <span class="toggle-list-item__label">' + | $( '#p-tb' ).append( '<li class="toggle-list-item"><a class="toggle-list-item__anchor" href="' + $(location).attr( 'origin' ) + '/wiki/Special:Purge/' + mw.config.get( 'wgPageName' ) + '" data-mw="interface"><span class="mw-ui-icon mw-ui-icon-reload"></span> <span class="toggle-list-item__label">' + '刷新缓存' + '</span></a></li>' ); | ||
} | } | ||
else { | else { | ||
mw.util.addPortletLink( 'p-cactions' , $(location).attr( 'origin' ) + '/wiki/Special:Purge/' + mw.config.get( 'wgPageName' ), | mw.util.addPortletLink( 'p-cactions' , $(location).attr( 'origin' ) + '/wiki/Special:Purge/' + mw.config.get( 'wgPageName' ), '刷新缓存' ); | ||
} | } | ||
} | } | ||
})(jQuery, mw); | })(jQuery, mw); |
2025年9月13日 (六) 19:20的版本
/**
* 刷新缓存按钮
* 搬運自 https://zh.wikipedia.org/w/index.php?title=User:%E6%A1%90%E7%94%9F%E3%81%93%E3%81%93/js/Gadget-purge.js&oldid=69943550
* @author [[zhwp:User:桐生ここ]]
*/
(function($, mw) {
if ( mw.config.get( 'wgIsArticle' ) == true ) {
if ( ( mw.config.get( 'wgMFAmc' ) == true ) && ( $( '#p-tb' ).length != 0 ) ) {
$( '#p-tb' ).append( '<li class="toggle-list-item"><a class="toggle-list-item__anchor" href="' + $(location).attr( 'origin' ) + '/wiki/Special:Purge/' + mw.config.get( 'wgPageName' ) + '" data-mw="interface"><span class="mw-ui-icon mw-ui-icon-reload"></span> <span class="toggle-list-item__label">' + '刷新缓存' + '</span></a></li>' );
}
else {
mw.util.addPortletLink( 'p-cactions' , $(location).attr( 'origin' ) + '/wiki/Special:Purge/' + mw.config.get( 'wgPageName' ), '刷新缓存' );
}
}
})(jQuery, mw);