MediaWiki:Common.js:修订间差异
imported>=海豚= 无编辑摘要 |
小 fix |
||
| (未显示3个用户的11个中间版本) | |||
| 第87行: | 第87行: | ||
$(".mw-mmv-image").off("click")[0].addEventListener("click", function(e) { | $(".mw-mmv-image").off("click")[0].addEventListener("click", function(e) { | ||
if ($(e.target).is("img")) { | if ($(e.target).is("img")) { | ||
window.open($(e.target).attr("src").replace(/(www\.hmoegirl\. | window.open($(e.target).attr("src").replace(/(www\.hmoegirl\.info\/common\/)thumb\/([a-z\d]+\/[a-z\d]+\/)([^/]+)\/\d+px-\3/i, "$1$2$3"), "_blank").focus(); | ||
e.preventDefault(); | e.preventDefault(); | ||
e.stopPropagation(); | e.stopPropagation(); | ||
| 第143行: | 第143行: | ||
//重复文件列表函数 | //重复文件列表函数 | ||
function duplicatedFileList() { | function duplicatedFileList() { | ||
if (window.location.href.indexOf("title") === -1) { window.location.replace("http://www.hmoegirl. | if (window.location.href.indexOf("title") === -1) { window.location.replace("http://www.hmoegirl.info/index.php?title=Special:ListDuplicatedFiles&limit=500&offset=0"); } | ||
$("#mw-content-text .mw-spcontent ol").attr("id", | $("#mw-content-text .mw-spcontent ol").attr("id", | ||
"picOl"); | "picOl"); | ||
| 第153行: | 第153行: | ||
$(".mw-spcontent > p:nth-child(1), .mw-spcontent > p:nth-child(2), .mw-spcontent > p:nth-child(7)").hide(); | $(".mw-spcontent > p:nth-child(1), .mw-spcontent > p:nth-child(2), .mw-spcontent > p:nth-child(7)").hide(); | ||
} | } | ||
//关键词警告 | //关键词警告 | ||
function antiAbuseListener(textarea, event) { | function antiAbuseListener(textarea, event) { | ||
| 第166行: | 第162行: | ||
"[[分类:即将删除的页面]]", | "[[分类:即将删除的页面]]", | ||
"[[category:即将删除的页面]]", | "[[category:即将删除的页面]]", | ||
"开发票", | "开发票", | ||
"支那", | "支那", | ||
"zhina", | "zhina", | ||
| 第289行: | 第279行: | ||
container.append("您虽然无权编辑本页面,但您可以点击右侧按钮在本页的讨论页提出编辑请求,让可以编辑的人代为编辑:"); | container.append("您虽然无权编辑本页面,但您可以点击右侧按钮在本页的讨论页提出编辑请求,让可以编辑的人代为编辑:"); | ||
$("<span/>").addClass("newComment").text("提出编辑请求").on("click", function() { | $("<span/>").addClass("newComment").text("提出编辑请求").on("click", function() { | ||
window.open("https://www.hmoegirl. | window.open("https://www.hmoegirl.info/index.php?action=edit&preload=Template:编辑请求/comment&preloadtitle=编辑请求 - " + mw.config.get("wgUserName") + "§ion=new&title=" + talkpage, "_blank"); | ||
}).appendTo(container); | }).appendTo(container); | ||
$("#mw-content-text").children(".wikiEditor-ui:first, textarea[readonly]:first").before("<hr>").before(container); | $("#mw-content-text").children(".wikiEditor-ui:first, textarea[readonly]:first").before("<hr>").before(container); | ||
| 第341行: | 第331行: | ||
}); | }); | ||
}, 200); | }, 200); | ||
//修正hash跳转错误 | //修正hash跳转错误 | ||
if ($(".mw-collapsible")[0]) { | if ($(".mw-collapsible")[0]) { | ||
| 第365行: | 第340行: | ||
}); | }); | ||
} | } | ||
}); | }); | ||
})(jQuery, mediaWiki); //立即执行匿名函数并传递原始变量以防止冲突 | |||
})(); | |||
// </nowiki> | // </nowiki> | ||