User:Irukaza/js/editConflict.js:修订间差异
跳到导航
跳到搜索
[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 | $("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行: | ||
} | } | ||
}); | }); | ||
await mw.loader.using('mediawiki.notification'); | await mw.loader.using('mediawiki.notification'); | ||
$("#mw-notification-area").css({ | $("#mw-notification-area").css({ | ||