From 59a5e0dee23dcaf662a9754d15645c258ee72f1b Mon Sep 17 00:00:00 2001 From: Shiba <44804845+DeepDoge@users.noreply.github.com> Date: Tue, 9 Aug 2022 22:22:25 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=99=20on=20redirect=20use=20replace=20?= =?UTF-8?q?if=20tab=20has=20no=20history?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/scripts/ytContent.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/scripts/ytContent.tsx b/src/scripts/ytContent.tsx index 67455e4..5c2148c 100644 --- a/src/scripts/ytContent.tsx +++ b/src/scripts/ytContent.tsx @@ -354,10 +354,15 @@ import { getExtensionSettingsAsync, getSourcePlatfromSettingsFromHostname, getTa location.replace(lbryURL) } else { - openNewTab(lbryURL) - - if (window.history.length === 1) window.close() - else window.history.back() + if (window.history.length === 1) + { + location.replace(lbryURL) + } + else + { + openNewTab(lbryURL) + window.history.back() + } } } } catch (error) {