你现在正在访问的是萌娘百科用于保存和管理图片、音频等媒体文件的子项目萌娘共享,想要回到萌娘百科,请使用浏览器上的返回按钮、或点击这里
“MediaWiki:Common.js”的版本间的差异
第36行: | 第36行: | ||
}))); | }))); | ||
if ($(".mw-special-ListDuplicatedFiles")[0] && $('.mw-spcontent > p')[1]) { | if ($(".mw-special-ListDuplicatedFiles")[0] && $('.mw-spcontent > p')[1]) { | ||
− | if (window.location.href.indexOf("title") == -1) window.location.replace("http:// | + | if (window.location.href.indexOf("title") == -1) window.location.replace("http://commons.moegirl.org/index.php?title=Special:ListDuplicatedFiles&limit=500&offset=0"); |
$('#mw-content-text .mw-spcontent ol').attr("id", "picOl"); | $('#mw-content-text .mw-spcontent ol').attr("id", "picOl"); | ||
$('#picOl').before('<p id="picOlTitle">图片列表:</p>').after('<p id="MP3OlTitle">MP3列表:</p><ol start="1" id="MP3Ol"></ol>'); | $('#picOl').before('<p id="picOlTitle">图片列表:</p>').after('<p id="MP3OlTitle">MP3列表:</p><ol start="1" id="MP3Ol"></ol>'); |
2016年12月2日 (五) 19:50的版本
/* 这里的任何JavaScript将为所有用户在每次页面载入时加载。 */ $(function() { $("#back").on("click", function() { if (history.length === 1) window.alert("您是通过外链等方式“在新标签页”访问本页面的,请您直接切换到原来的标签页,多谢合作。"); else history.go(-1); }); if ($(".fileInfo")[0]) $(".fileInfo").after($("<div/>", { css: { 'margin-top': '.5em' } }).append($("<a/>", { css: { "box-sizing":"border-box", "-webkit-appearance":"none", zoom:"1", "vertical-align":"middle", background:"#ffffff", color:"#555555", border:"1px solid #cccccc", "text-align":"center", "font-weight":"bold", cursor:"pointer", "max-width":"28.75em", padding:".5em 1em", margin:"0", "border-top-left-radius":"2px", "border-bottom-left-radius":"2px", "text-decoration":"none", "min-width":"48px", "font-family":"inherit", "font-size":"1em", "line-height": "1.6em" }, text:"在萌娘百科上查看文件说明页" }).on("click", function() { window.open("https://zh.moegirl.org" + location.pathname + location.search, "_blank"); }))); if ($(".mw-special-ListDuplicatedFiles")[0] && $('.mw-spcontent > p')[1]) { if (window.location.href.indexOf("title") == -1) window.location.replace("http://commons.moegirl.org/index.php?title=Special:ListDuplicatedFiles&limit=500&offset=0"); $('#mw-content-text .mw-spcontent ol').attr("id", "picOl"); $('#picOl').before('<p id="picOlTitle">图片列表:</p>').after('<p id="MP3OlTitle">MP3列表:</p><ol start="1" id="MP3Ol"></ol>'); $("#picOlTitle, #MP3OlTitle").hide(); $("#picOl").find("[href$='.mp3'], [href$='.ogg']").parent().appendTo("#MP3Ol"); if ($("#picOl").find("li").length) $("#picOlTitle").show(); if ($("#MP3Ol").find("li").length) $("#MP3OlTitle").show(); $(".mw-spcontent > p:nth-child(1), .mw-spcontent > p:nth-child(2), .mw-spcontent > p:nth-child(7)").hide(); } });