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

跳到导航 跳到搜索
删除603字节 、​ 2020年5月5日 (星期二)
[InPageEdit] 没有编辑摘要
imported>=海豚=
([InPageEdit] 没有编辑摘要)
imported>=海豚=
([InPageEdit] 没有编辑摘要)
第36行: 第36行:
              const pageid = Object.keys(result.query.pages)[0];
              const pageid = Object.keys(result.query.pages)[0];
              if (pageid > 0 && result.query.pages[pageid].revisions[0].revid > wgCurRevisionId) {
              if (pageid > 0 && result.query.pages[pageid].revisions[0].revid > wgCurRevisionId) {
                wpSave.val("提交失败 存在编辑冲突!");
                wpSave.val("提交失败 存在编辑冲突!");
                $("body").append(`<div style="background: #3366CC; color: white; text-align: center; padding: .5rem; position: fixed; top: 0; left: 0; right: 0; z-index: 9999;"><p>本页面已被他人更改。请比对后重新开始编辑,以避免这中间的编辑丢失。</p><p><span id="copyCurrentRawCode" class="mw-ui-button">复制当前编辑内容</span> <span id="showNewestRevisionDiff" class="mw-ui-button">查看最新版本差异</span> <span id="refreshPage" class="mw-ui-button mw-ui-destructive">不保存内容,直接刷新页面(慎重!)</span></div>`);
                $("body").append(`<div style="background: #3366CC; color: white; text-align: center; padding: .5rem; position: fixed; top: 0; left: 0; right: 0; z-index: 9999;"><p>本页面已被他人更改。请 备份您的编辑内容, 比对后重新开始编辑,以避免这中间的编辑丢失。</p></div>`);
                const pre = $("<pre/>", {
                const pre = $("<pre/>", {
                  css: {
                  css: {
第71行: 第71行:
                  }
                  }
                });
                });
               disable($("#wpPreview, #wpDiff").on("click", () => {
                 setTimeout(() => {
                   alert(conflictAlert);
                 }, 1);
                 return false;
               }).attr("title", conflictAlert));
                await mw.loader.using('mediawiki.notification');
                await mw.loader.using('mediawiki.notification');
                $("#mw-notification-area").css({
                $("#mw-notification-area").css({
匿名用户

导航菜单