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

删除1,546字节 、​ 2020年5月27日 (星期三)
无编辑摘要
imported>=海豚=
无编辑摘要
imported>=海豚=
无编辑摘要
第43行: 第43行:
                    "z-index": "-99999",
                    "z-index": "-99999",
                  }
                  }
               });
               const textarea = $("#wpTextbox1");
               $("#copyCurrentRawCode").on("click", () => {
                 if ($(".ace_editor").length > 0) {
                   mw.notify("当前已开启代码编辑器,无法获取真实编辑内容,请手动复制。");
                   return;
                 }
                 const selection = window.getSelection();
                 const range = selection.getRangeAt(0);
                 pre.text(textarea.val());
                 selection.selectAllChildren(pre[0]);
                 document.execCommand("copy");
                 window.setTimeout(function() {
                   selection.removeAllRanges();
                   selection.addRange(range);
                   pre.empty();
                 }, 0);
                 mw.notify("复制成功!");
                });
                });
                $("#showNewestRevisionDiff").on("click", () => {
                $("#showNewestRevisionDiff").on("click", () => {
                  window.open(`https://www.hmoegirl.com/?diff=${result.query.pages[pageid].revisions[0].revid}`, "_blank").focus();
                  window.open(`https://www.hmoegirl.com/?diff=${result.query.pages[pageid].revisions[0].revid}`, "_blank").focus();
               });
               $("#refreshPage").on("click", () => {
                 if (confirm("请注意刷新后原来的编辑内容将会被最新版本的源码替换!\n历时如果您想找回您的编辑请点击还原备份按钮\n点击确定将会刷新页面!!")) {
                   location.reload(false);
                 }
                });
                });
                disable($("#wpSave").on("click", () => {
                disable($("#wpSave").on("click", () => {
匿名用户