MediaWiki:Common.js

来自Ashes of Creation Wiki
跳到导航 跳到搜索

注意:在保存之后,您可能需要清除浏览器缓存才能看到所作出的变更的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Internet Explorer:按住Ctrl的同时单击刷新,或按Ctrl-F5
  • Opera:前往菜单 → 设置(Mac为Opera → Preferences),然后隐私和安全 → 清除浏览数据 → 缓存的图片和文件
$(function () {
    /*$('.gallery video:not([controls]):not(.mediatest)').click(function (e) {
        var url = $(e.target).find('a').text();
        window.location.href = url;
    });*/
    $('.gallery.hoverhighlight a:has(img[link])').removeClass('image').off('click').click(function (e) {
        e.preventDefault();
        e.stopPropagation();
        return false;
    });
    $('.gallery.hoverhighlight a').off('click').click(function (e) {
        e.preventDefault();
        e.stopPropagation();
        var url = decodeURI($(e.target).parents('a').first().attr('href'));
        if(!url) return false;
        var matches = url.match(/"(.*?)"/);
        if(matches)
           window.location.href = matches[1];
        return false;
    });
});