MediaWiki:Gadget-Purge.js:修订间差异
跳转到导航
跳转到搜索
小 // Edit via InPageEdit 标签:已被回退 |
小 (编辑自 Special:Permalink/86905) // Edit via InPageEdit 标签:手工回退 |
||
(未显示同一用户的1个中间版本) | |||
第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:桐生ここ]] | |||
*/ | |||
(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' ) + '/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' ) + '/Special:Purge/' + mw.config.get( 'wgPageName' ), '刷新缓存' ); | |||
} | |||
} | } | ||
})(jQuery, mw); | |||
2025年9月14日 (日) 08:22的最新版本
/**
* 刷新缓存按钮
* 修改自 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' ) + '/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' ) + '/Special:Purge/' + mw.config.get( 'wgPageName' ), '刷新缓存' );
}
}
})(jQuery, mw);