[NoTrack] Fallback/more disabling of Sentry in inject
This commit is contained in:
parent
0018c52257
commit
967229fea8
1 changed files with 6 additions and 0 deletions
|
@ -1,6 +1,12 @@
|
||||||
if ('<notrack>' === 'true') { // Disable sentry
|
if ('<notrack>' === 'true') { // Disable sentry
|
||||||
try {
|
try {
|
||||||
window.__SENTRY__.hub.getClient().getOptions().enabled = false;
|
window.__SENTRY__.hub.getClient().getOptions().enabled = false;
|
||||||
|
|
||||||
|
window.__SENTRY__.hub.getClient().close();
|
||||||
|
window.__SENTRY__.hub.getScope().clear();
|
||||||
|
|
||||||
|
window.__SENTRY__.hub.addBreadcrumb = () => {};
|
||||||
|
|
||||||
Object.keys(console).forEach(x => console[x] = console[x].__sentry_original__ ?? console[x]);
|
Object.keys(console).forEach(x => console[x] = console[x].__sentry_original__ ?? console[x]);
|
||||||
} catch { }
|
} catch { }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue