From a0963db2b4c43261afb4b0c6e7ced85782d8a3e2 Mon Sep 17 00:00:00 2001 From: Kevin Raoofi Date: Thu, 21 Jan 2021 17:00:09 -0500 Subject: [PATCH 1/2] build glob parity with watch It seems like I only cared about the watch command and missed updating `build` in the past. This makes the CI build broken packages. --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index b4d44fb..dfd1c86 100644 --- a/package.json +++ b/package.json @@ -3,9 +3,9 @@ "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,ts}\" \"src/**/*.html\"", + "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\"", "build:webext": "web-ext build --source-dir ./dist --overwrite-dest", "build": "npm-run-all -l -p build:parcel build:assets", From 410a87710be4f48e7393945ce09d88992596096a Mon Sep 17 00:00:00 2001 From: Kevin Raoofi Date: Thu, 21 Jan 2021 17:01:35 -0500 Subject: [PATCH 2/2] Fix redirect The odysee button change came with passing around the secondary part of the URL instead of the whole thing. Unfortunately, this change requires functions to be a little smarter and resolve with the domain lookup. This was missed for redirects. --- src/scripts/ytContent.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); }, });