mirror of
https://github.com/tcsenpai/Zundler.git
synced 2025-06-06 11:35:40 +00:00
Monkeypatch more functions used by Sphinx
This also monkeypatches `URLSearchParams.delete` and `window.history`.
This commit is contained in:
parent
2b870da3cb
commit
70d3a54215
@ -30,10 +30,20 @@ var myGet = function (arg) {
|
||||
}
|
||||
};
|
||||
|
||||
var myDelete = function (arg) {};
|
||||
|
||||
URLSearchParams.prototype.get = myGet;
|
||||
URLSearchParams.prototype.delete = myDelete;
|
||||
|
||||
/*
|
||||
* Monkeypatch fetch
|
||||
* Monkeypatch window.history
|
||||
*/
|
||||
|
||||
var myReplaceState = function (arg1, arg2, arg3) {};
|
||||
window.history.replaceState = myReplaceState;
|
||||
|
||||
/*
|
||||
* Monkeypatch window.fetch
|
||||
*/
|
||||
|
||||
const { fetch: originalFetch } = window;
|
||||
|
Loading…
x
Reference in New Issue
Block a user