Got a spare minute? The Archives need some love. See the to-do list to find a way to help.
If you upload a new image make sure you name and categorize it properly. If in doubt, ask an admin or see our FAQ page.

User:Magikarp(en)/monobook.js: Difference between revisions

From Bulbagarden Archives
Jump to navigationJump to search
(Created page with "→‎清除當前頁片緩存: if ( wgUserName ) { mw.util.addPortletLink('p-personal', '#', '清除圖片緩存', 'pt-purgeimg', '', null, '#pt-preferences'); $('#p-p...")
 
m (Blanked the page)
 
Line 1: Line 1:
/* 清除當前頁片緩存 */
 
if ( wgUserName ) {
    mw.util.addPortletLink('p-personal', '#', '清除圖片緩存', 'pt-purgeimg', '', null, '#pt-preferences');
    $('#p-personal').on('click', '#pt-purgeimg a', function(e){
        e.preventDefault();
        $('img[src^="http://static.52poke.com/wiki"]').each(function(i, img){
            var purge = new Image();
            purge.src = img.src.replace(/\.com\/wiki/, '.com/purge/wiki');
        });
        $('#pt-purgeimg a').text('已清除本頁的圖片緩存');
    });
}

Latest revision as of 13:12, 20 October 2018