MediaWiki:Gadget-ShortURL.js:修订间差异
删除的内容 添加的内容
修复 ES2018 对象展开运算符 ...parameters 导致解析错误的问题 |
从求闻原版复制,仅改 getShortDomains() 为硬编码 test.zybkcn.com |
||
第308行:
$headerElement.prependTo(".mw-indicators");
}
const fullLink = wgUserName
const $notifyElement = $(/* @__PURE__ */ import_ext_gadget3.default.createElement("span", null, getMessage("URL copied to clipboard"), /* @__PURE__ */ import_ext_gadget3.default.createElement("br", null), /* @__PURE__ */ import_ext_gadget3.default.createElement("a", {
href: "#",
第365行:
var _ref = _asyncToGenerator(function* (diffId) {
try {
return yield api.get
...parameters,
fromrev: diffId
}
} catch (error) {
console.error("[ShortURL] Ajax error:", error);
第425行 ⟶ 第426行:
}
if (wgAction === "view" && wgArticleId) {
if ($content.attr("id") !== "mw-content-text") {
return;
第436行 ⟶ 第437行:
revisionId: mw.config.get("wgRevisionId")
});
});
}
})();
| |||