Hook.js

Javascript function hook

Dieses Skript sollte nicht direkt installiert werden. Es handelt sich hier um eine Bibliothek für andere Skripte, welche über folgenden Befehl in den Metadaten eines Skriptes eingebunden wird // @require https://update.greasyforks.org/scripts/443030/1037826/Hookjs.js

Autor
invobzvr
Version
0.1
Erstellt am
09.04.2022
Letzte Aktualisierung
09.04.2022
Größe
1,26 KB
Lizenz
GPL-3.0

Hook.js

Description

Javascript function hook

Example

fetch.hook(function () {
    if (arguments[0].endsWith('/log')) {
        return new Response('{"error":0,"data":"ok"}');
    }
});
History.prototype.pushState.hook({
    scope: History.prototype,
    before: function () {
        dispatchEvent(new CustomEvent('pushstate', { detail: arguments[2] }));
    },
});
长期地址
遇到问题?请前往 GitHub 提 Issues。