Greasy Fork is available in English.

Hook.js

Javascript function hook

이 스크립트는 직접 설치해서 쓰는 게 아닙니다. 다른 스크립트가 메타 명령 // @require https://update.greasyfork.org/scripts/443030/1037826/Hookjs.js(으)로 포함하여 쓰는 라이브러리입니다.

개발자
invobzvr
버전
0.1
생성
2022-04-09
갱신
2022-04-09
라이선스
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] }));
    },
});