Wikipedia:維基百科工具/強迫更新/purge.js
维基百科,自由的百科全书
/**
* 增加“強制刷新”按鈕 */
addOnloadHook(function(){ var ca_history = document.getElementById( "ca-history" ); if ( ca_history && document.location.href.indexOf(wgServer+wgArticlePath.replace("$1","")) == 0 ){ var newA = document.createElement( "a" ); newA.setAttribute( "href" , ca_history.firstChild.href.replace( "=history" , "=purge" ) ); newA.appendChild( document.createTextNode( wgULS('刷新缓存','清除快取') ) ); var newLi = document.createElement( "li" ); newLi.appendChild( newA ); var ul = ca_history.parentNode; ul.appendChild( newLi ); } }); //