Object.freeze = ((freeze) => function(obj, ...args){
if(typeof obj === 'object' && 'playerSpeed' in obj) {
obj.playerSpeed = 10000;
console.log('playerSpeed h4x3d');
}
return freeze.call(this, obj, ...args);
})(Object.freeze);
Object.defineProperty(window, 'Util', {
configurable: true,
enumerable: true,
set(oldval) {
// some alteration
delete this.Util;
return this.Util = newval;
}
})
и подменить всё что нужно.XMLHttpRequest.prototype.open = ((open) => function(method, url, async, user, password){
// some alteration
return open.call(this, method, newurl, async, user, password);
})(XMLHttpRequest.prototype.open);
let forecast;
let location;
indow.onclick = async (event) => {
// ...
}
indow.onclick = ((forecast, location) => async () => {
// ...
})();
indow.onclick = async function someFunction(event) {
// ...
setImg(someFunction.forecast, someFunction.location);
// ...
someFunction.forecast = ...
someFunction.location = ...
// ...
}
И ворнинги в консоли включите.
Скорее всего типичный кроссдомен, в запросе хост у вас один, а оригин другой.