MediaWiki:Gadget-Purge.js:修订间差异
去掉wgULS |
小 (编辑自 Special:Permalink/86905) // Edit via InPageEdit 标签:手工回退 |
||
(未显示3个用户的5个中间版本) | |||
第1行: | 第1行: | ||
/** | /** | ||
* 刷新缓存按钮 | * 刷新缓存按钮 | ||
* | * 修改自 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:桐生ここ]] | * @author [[zhwp:User:桐生ここ]] | ||
*/ | */ | ||
第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' ) + ' | $( '#p-tb' ).append( '<li class="toggle-list-item"><a class="toggle-list-item__anchor" href="' + $(location).attr( 'origin' ) + '/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' ) + ' | mw.util.addPortletLink( 'p-cactions' , $(location).attr( 'origin' ) + '/Special:Purge/' + mw.config.get( 'wgPageName' ), '刷新缓存' ); | ||
} | } | ||
} | } | ||
})(jQuery, mw); | })(jQuery, mw); |