restore more native stuff

This commit is contained in:
Astra 2018-04-28 08:42:43 -04:00
parent b212f64595
commit b1f92360f6

View file

@ -37,9 +37,10 @@
// early init payload // early init payload
document.addEventListener('ep-prepared', () => { document.addEventListener('ep-prepared', () => {
// restore the original console methods // restore original native methods
var origConsole = wc.findCache('_originalConsoleMethods')[0].exports._originalConsoleMethods; var sentry = wc.findCache('_originalConsoleMethods')[0].exports;
Object.keys(origConsole).forEach(x => global.console[x] = origConsole[x]); window.console = Object.assign(window.console, sentry._originalConsoleMethods); // console
sentry._wrappedBuiltIns.forEach(x => x[0][x[1]] = x[2]); // other stuff
// fetch the changelog // fetch the changelog
fetch('https://endpwn.github.io/changelog.md?_=' + Date.now()).then(r => r.text()).then(l => { fetch('https://endpwn.github.io/changelog.md?_=' + Date.now()).then(r => r.text()).then(l => {