2020-11-24 04:26:43 +01:00
|
|
|
// Freezes all intrinsics
|
2020-12-10 18:33:04 +01:00
|
|
|
try {
|
|
|
|
// eslint-disable-next-line no-undef,import/unambiguous
|
|
|
|
lockdown({
|
|
|
|
consoleTaming: 'unsafe',
|
|
|
|
errorTaming: 'unsafe',
|
|
|
|
mathTaming: 'unsafe',
|
|
|
|
dateTaming: 'unsafe',
|
2021-03-26 05:27:25 +01:00
|
|
|
overrideTaming: 'severe',
|
2021-02-04 19:15:23 +01:00
|
|
|
});
|
2020-12-10 18:33:04 +01:00
|
|
|
} 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
|
2021-02-04 19:15:23 +01:00
|
|
|
console.error('Lockdown failed:', error);
|
2021-07-15 19:59:34 +02:00
|
|
|
if (globalThis.sentry && globalThis.sentry.captureException) {
|
|
|
|
globalThis.sentry.captureException(error);
|
2020-12-10 18:33:04 +01:00
|
|
|
}
|
|
|
|
}
|