diff --git a/package-lock.json b/package-lock.json index 0a1a95a..ca01a2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4123,6 +4123,12 @@ "integrity": "sha1-MdDb9RdimM2AYnSsxDgzhbgai7Y=", "dev": true }, + "webextension-polyfill": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/webextension-polyfill/-/webextension-polyfill-0.3.0.tgz", + "integrity": "sha512-SKwaW0Q3Ke/MZnYFw5J+zb4vNcDXFfP6TJxMIqFqEm+oMr3V+B1Hk6vq37rsJaglYIXkeDn5Y46M+x+ARbA+8g==", + "dev": true + }, "webpack": { "version": "4.16.5", "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.16.5.tgz", diff --git a/package.json b/package.json index 89eea78..a529a13 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "ts-loader": "^4.4.2", "typescript": "^3.0.1", "web-ext-types": "^2.1.0", + "webextension-polyfill": "^0.3.0", "webpack": "^4.16.5", "webpack-cli": "^3.1.0" }, diff --git a/src/background.ts b/src/background.ts index a02f5c6..81179fb 100644 --- a/src/background.ts +++ b/src/background.ts @@ -15,6 +15,7 @@ */ import * as _ from 'lodash/fp'; +import * as browser from 'webextension-polyfill'; const buildSearchURL = (instance: string, query: string): string => `https://${instance}/api/v1/search/videos?search=${encodeURIComponent(query)}`; diff --git a/src/options.ts b/src/options.ts index b38fe2e..4941277 100644 --- a/src/options.ts +++ b/src/options.ts @@ -15,6 +15,7 @@ */ import * as _ from 'lodash/fp'; +import * as browser from 'webextension-polyfill'; function id(id: string): Element { return document.getElementById(id); } diff --git a/src/youtube.ts b/src/youtube.ts index a59c2b5..10646d2 100644 --- a/src/youtube.ts +++ b/src/youtube.ts @@ -15,6 +15,7 @@ */ import * as _ from 'lodash/fp'; +import * as browser from 'webextension-polyfill'; const watchURL = (host, uuid) => `https://${host}/videos/watch/${uuid}`; const thumbnailURL = (host, path) => `https://${host}${path}`;