1
0
mirror of https://gitlab.com/Cha_deL/peertubeify synced 2024-12-22 12:54:06 +01:00

Add polyfill to run on chromium browsers

This commit is contained in:
Ealhad 2018-08-14 12:43:26 +02:00
parent 462eded1ae
commit 7877257edd
5 changed files with 10 additions and 0 deletions

6
package-lock.json generated
View File

@ -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",

View File

@ -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"
},

View File

@ -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)}`;

View File

@ -15,6 +15,7 @@
*/
import * as _ from 'lodash/fp';
import * as browser from 'webextension-polyfill';
function id(id: string): Element { return document.getElementById(id); }

View File

@ -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}`;