User:Irukaza/js/editConflict.js:修订间差异

删除1,385字节 、​ 2021年2月24日 (星期三)
无编辑摘要
imported>=海豚=
无编辑摘要
imported>=海豚=
无编辑摘要
第41行: 第41行:
                });
                });
                const textarea = $("#wpTextbox1");
                const textarea = $("#wpTextbox1");
               $("#copyCurrentRawCode").on("click", async () => {
                 await mw.loader.using('mediawiki.notification');
                 $("#mw-notification-area").css({
                   position: "fixed",
                   top: 0,
                 }).appendTo("body");
                 const selection = window.getSelection();
                 const rangeCount = selection.rangeCount;
                 let range;
                 if (rangeCount > 0) {
                   range = selection.getRangeAt(0);
                 }
                 pre.text(textarea.val());
                 selection.selectAllChildren(pre[0]);
                 document.execCommand("copy");
                 window.setTimeout(function() {
                   selection.removeAllRanges();
                   if (rangeCount > 0) {
                     selection.addRange(range);
                   }
                   pre.empty();
                 }, 0);
                 mw.notify("复制成功!");
               });
                $("#showNewestRevisionDiff").on("click", () => {
                $("#showNewestRevisionDiff").on("click", () => {
                  window.open(`${mw.config.get("wgServer")}${mw.config.get("wgScriptPath")}/index.php?diff=${result.query.pages[pageid].revisions[0].revid}`, "_blank").focus();
                  window.open(`${mw.config.get("wgServer")}${mw.config.get("wgScriptPath")}/index.php?diff=${result.query.pages[pageid].revisions[0].revid}`, "_blank").focus();
匿名用户