You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
696 B
21 lines
696 B
4 years ago
|
// Freezes all intrinsics
|
||
4 years ago
|
try {
|
||
|
// eslint-disable-next-line no-undef,import/unambiguous
|
||
|
lockdown({
|
||
|
consoleTaming: 'unsafe',
|
||
|
errorTaming: 'unsafe',
|
||
|
mathTaming: 'unsafe',
|
||
|
dateTaming: 'unsafe',
|
||
4 years ago
|
overrideTaming: 'severe',
|
||
4 years ago
|
});
|
||
4 years ago
|
} catch (error) {
|
||
|
// If the `lockdown` call throws an exception, it interferes with the
|
||
|
// contentscript injection on some versions of Firefox. The error is
|
||
|
// caught and logged here so that the contentscript still gets injected.
|
||
|
// This affects Firefox v56 and Waterfox Classic
|
||
4 years ago
|
console.error('Lockdown failed:', error);
|
||
3 years ago
|
if (globalThis.sentry && globalThis.sentry.captureException) {
|
||
|
globalThis.sentry.captureException(error);
|
||
4 years ago
|
}
|
||
|
}
|