Hook.js

Javascript function hook

This script should not be not be installed directly. It is a library for other scripts to include with the meta directive // @require https://update.greasyforks.org/scripts/443030/1037826/Hookjs.js

Autor
invobzvr
Verzija
0.1
Napravljeno
09/04/2022
Ažurirano
09/04/2022
Size
1,26 КБ
Licenca
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。