-
-
Save alufers/895f6b2fbd37734567bdbf4d3291e1f7 to your computer and use it in GitHub Desktop.
Instrumentator
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__buf = ""; | |
__window = { | |
atob: function (str) { | |
let d = atob(str); | |
console.log(__buf) | |
__buf = ""; | |
return d; | |
}, | |
String: { | |
fromCharCode: function (...args) { | |
let d = String.fromCharCode(...args); | |
__buf += d; | |
return d; | |
} | |
}, | |
RegExp: RegExp, | |
JSON: JSON, | |
Array: Array, | |
}; | |
window = new Proxy(__window, { | |
get: function (target, name) { | |
// console.log('get', name); | |
return target[name] || __window[name]; | |
}, | |
}); | |
__document = { | |
addEventListener: function (...args) { | |
console.log('addEventListener', ...args); | |
}, | |
}; | |
document = new Proxy(__document, { | |
get: function (target, name) { | |
// console.log('get', name); | |
return target[name] || __document[name]; | |
}, | |
fetch: function (...args) { | |
console.log('fetch', ...args); | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment