@@ -7,8 +7,15 @@ import { getDirName, isDev, port, resolveParent } from './utils';
7
7
import type { Manifest } from 'webextension-polyfill' ;
8
8
9
9
export const Endpoints = {
10
- Production : 'https://api.trakt.tv' ,
11
- Staging : 'https://api-staging.trakt.tv' ,
10
+ trakt : {
11
+ Production : 'https://api.trakt.tv' ,
12
+ Staging : 'https://api-staging.trakt.tv' ,
13
+ } ,
14
+ tvdb : 'https://api4.thetvdb.co' ,
15
+ tmdb : {
16
+ api : 'https://api.themoviedb.org' ,
17
+ redirect : 'https://www.themoviedb.org' ,
18
+ } ,
12
19
} as const ;
13
20
14
21
export const manifest : Manifest . WebExtensionManifest = {
@@ -38,10 +45,10 @@ export const manifest: Manifest.WebExtensionManifest = {
38
45
web_accessible_resources : [
39
46
{
40
47
resources : [ '/views/options/index.html' ] ,
41
- matches : [ `${ Endpoints . Production } /*` , `${ Endpoints . Staging } /*` ] ,
48
+ matches : [ `${ Endpoints . trakt . Production } /*` , `${ Endpoints . trakt . Staging } /*` , ` ${ Endpoints . tvdb } /*` , ` ${ Endpoints . tmdb . redirect } /*`] ,
42
49
} ,
43
50
] ,
44
- host_permissions : [ `${ Endpoints . Production } /*` , `${ Endpoints . Staging } /*` ] ,
51
+ host_permissions : [ `${ Endpoints . trakt . Production } /*` , `${ Endpoints . trakt . Staging } /*` , ` ${ Endpoints . tvdb } /*` , ` ${ Endpoints . tmdb . api } /*`] ,
45
52
content_security_policy : {
46
53
// Adds localhost for vite hot reload
47
54
extension_pages : isDev
0 commit comments