无编辑摘要
imported>=海豚= 无编辑摘要 |
imported>=海豚= 无编辑摘要 |
||
(未显示同一用户的10个中间版本) | |||
第1行: | 第1行: | ||
mw.loader.load("https://cdn.jsdelivr.net/ | "use strict"; | ||
mw.loader.load("https://cdn.jsdelivr.net/npm/mediawiki-inpageedit@latest/dist/InPageEdit.min.js"); | |||
mw.hook("InPageEdit").add(function() { | mw.hook("InPageEdit").add(function (ctx) { | ||
var InPageEdit = ctx.InPageEdit, | |||
mw. | _msg = ctx._msg, | ||
wgPageName = mw.config.get("wgPageName"), | |||
wgRevisionId = mw.config.get("wgRevisionId"); | |||
$("#ca-edit").after( | |||
$("<li>", { | |||
id: "ca-quick-edit", | |||
"class": "collapsible" | |||
}).append( | |||
$("<span>").append( | |||
$("<a>", { | |||
href: "javascript:void(0)", | |||
text: typeof Wikiplus !== "undefined" ? _msg("quick-edit") + "(IPE)" : _msg("quick-edit") | |||
}).on("click", function () { | |||
InPageEdit.quickEdit({ | |||
page: wgPageName, | |||
revision: wgRevisionId | |||
}); | |||
}) | |||
) | |||
) | |||
); | |||
}); | }); |