Javascript function hook
ეს სკრიპტი არ უნდა იყოს პირდაპირ დაინსტალირებული. ეს ბიბლიოთეკაა, სხვა სკრიპტებისთვის უნდა ჩართეთ მეტა-დირექტივაში // @require https://update.greasyfork.org/scripts/443030/1037826/Hookjs.js.
Javascript function hook
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] }));
},
});