skip unnecessary polyfills in content scripts
This commit is contained in:
parent
8842247cd0
commit
cb4f875fe1
|
@ -9,6 +9,11 @@ self.INJECTED !== 1 && (() => {
|
||||||
if (!Object.values) {
|
if (!Object.values) {
|
||||||
Object.values = obj => Object.keys(obj).map(k => obj[k]);
|
Object.values = obj => Object.keys(obj).map(k => obj[k]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the above was shared by content scripts and workers,
|
||||||
|
// the rest is only needed for our extension pages
|
||||||
|
if (!self.chrome || !self.chrome.tabs) return;
|
||||||
|
|
||||||
if (typeof document === 'object') {
|
if (typeof document === 'object') {
|
||||||
const ELEMENT_METH = {
|
const ELEMENT_METH = {
|
||||||
append: {
|
append: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user