diff --git a/package.json b/package.json index da6bb95..2d11a27 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "version": "1.5.4", "license": "GPL-3.0", "scripts": { - "build:assets": "cpx \"src/**/*.{json,png}\" dist/", + "build:assets": "cpx \"src/**/*.{json,png,svg}\" dist/", "watch:assets": "cpx --watch -v \"src/**/*.{json,png,svg}\" dist/", "build:parcel": "cross-env NODE_ENV=production parcel build --no-source-maps --no-minify \"src/scripts/*.{js,jsx,ts,tsx}\" \"src/**/*.html\"", "watch:parcel": "parcel watch --no-hmr --no-source-maps \"src/scripts/*.{js,jsx,ts,tsx}\" \"src/**/*.html\"", diff --git a/src/scripts/ytContent.tsx b/src/scripts/ytContent.tsx index 2c59f69..2496c03 100644 --- a/src/scripts/ytContent.tsx +++ b/src/scripts/ytContent.tsx @@ -112,8 +112,9 @@ const handle = (url: URL | Location) => handleURLChange(url, { render(, mountPoint); }, onRedirect({ redirect, url }) { - if (redirect === 'app') return openApp(url); - location.replace(url); + const domain = redirectDomains[redirect]; + if (redirect === 'app') return openApp(domain.prefix + url); + location.replace(domain.prefix + url); }, });