打开主菜单
首页
随机
登录
设置
关于Akarin
免责声明
Akarin
搜索
查看“User:枫夜龙吟/common.js”的源代码
←
User:枫夜龙吟/common.js
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您没有权限编辑此JavaScript页面,因为此页面包含另一位用户的个人设置。
您可以查看和复制此页面的源代码。
/** * Minified by jsDelivr using Terser v3.14.1. * Original file: /gh/lovelyCARDINAL/moegirl@master/MU.js * * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files */ $(function(){var e=$("#p-cactions .menu ul");!e.find("li")[0]||$(".willBeDeleted")[0]||-1===mw.config.get("wgUserGroups").indexOf("patroller")||0!==mw.config.get("wgNamespaceNumber")&&10!=mw.config.get("wgNamespaceNumber")||$("<a/>",{attr:{href:"#",title:"移动到创建者的用户子页并挂删[alt-shift-m]",accesskey:"m"},text:"打入冷宫"}).on("click",function(){var e,t=new mw.Api,o=$("<div/>",{css:{position:"fixed",top:"0",left:"0",height:"100vh",width:"100vw",transition:"opacity .73s linear",color:"black","padding-top":"49vh","background-color":"rgba(255,255,255,0.73)","text-align":"center"}}).append('<img src="https://static.mengniang.org/common/d/d1/Windows_10_loading.gif" style="height: 1em; margin-top: -.25em;">正在打回中……');o.endOut=function(){this.css("color","red").text("打入冷宫失败……").delay(1e3).queue(function(){$(this).css("opacity","0").delay(730).queue(function(){$(this).remove(),$(document.body).css("overflow","auto"),$(this).dequeue()}),$(this).dequeue()})},t.get({action:"query",format:"json",prop:"contributors",titles:mw.config.get("wgPageName")}).then(function(n){if(console.log("get contributors done"),n.error)alert("查询贡献信息失败!");else if(1==n.query.pages[mw.config.get("wgArticleId")].contributors.length||!1!==confirm("贡献者并非只有创建者一人,请检查页面历史。确定打回创建者用户页?")){if(null!==(e=prompt("打回用户页的理由将会作为移动原因和挂删理由\n空白则使用默认(无实质内容或不在收录范围内,移动回创建者用户子页面)\n取消则不打入冷宫:")))return""===e&&(e="无实质内容或不在收录范围内,移动回创建者用户子页面"),$(document.body).append(o).css("overflow","hidden"),t.get({action:"query",format:"json",prop:"revisions",titles:mw.config.get("wgPageName"),rvprop:"ids|user",rvlimit:1,rvdir:"newer"})}},o.endOut.bind(o)).then(function(n){return console.log("query revisions done"),n.error?o.endOut():t.postWithToken("csrf",{action:"move",format:"json",from:mw.config.get("wgPageName"),to:"User:"+n.query.pages[mw.config.get("wgArticleId")].revisions[0].user+"/"+mw.config.get("wgPageName"),reason:e,watchlist:"preferences"})},o.endOut.bind(o)).then(function(n){if(console.log("move done"),n.error)return o.endOut();var i=e?"|"+e:"";return t.postWithToken("csrf",{action:"edit",format:"json",title:mw.config.get("wgPageName"),text:"<noinclude>{{即将删除"+i+"|user="+mw.config.get("wgUserName")+"}}</noinclude>",summary:"移动回用户子页面:"+e,nocreate:!0,watchlist:"preferences"})},o.endOut.bind(o)).then(function(e){if(console.log("register_to_delete done"),e.error)return o.endOut();o.css("color","green").text("打入冷宫成功!即将刷新……"),window.setTimeout(function(){window.location.reload()},730)},o.endOut.bind(o))}).appendTo($("<li/>",{attr:{id:"ca-moveToUserSubpage"}}).prependTo(e))}); //# sourceMappingURL=/sm/4404535ceace3c905e0d5779389fd5c56db26550ac55b5fd1ca4df144a88f1ff.map
返回至
User:枫夜龙吟/common.js
。