mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-06 08:30:29 +00:00
fix(extension): restore deprecated request APIs for compatibility (#1628)
This commit is contained in:
6 files changed
+131
-3
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
||||
gopeed.events.onResolve(async function (ctx) {
|
||||
for (const method of ['setUrl', 'setLabels', 'putLabel', 'delLabel', 'setMethod', 'putHeader', 'setTrackers']) {
|
||||
for (const method of ['setUrl', 'setMethod', 'putHeader', 'setTrackers']) {
|
||||
if (typeof ctx.req[method] !== 'undefined') throw new Error(`onResolve exposes ${method}`);
|
||||
}
|
||||
ctx.req.labels = { replaced: "true", removed: "true" };
|
||||
|
||||
Reference in new issue
Block a user