From 85faf25adbe114508d58af56644139833a7f3de6 Mon Sep 17 00:00:00 2001 From: arkon Date: Mon, 16 Dec 2024 18:44:04 -0500 Subject: [PATCH] Remove Android logic --- src/scripts/chat-injector.ts | 9 +-------- src/ts/chat-constants.ts | 7 +------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/scripts/chat-injector.ts b/src/scripts/chat-injector.ts index e1c2f325..d7b38259 100644 --- a/src/scripts/chat-injector.ts +++ b/src/scripts/chat-injector.ts @@ -1,6 +1,6 @@ import HcButton from '../components/HyperchatButton.svelte'; import { getFrameInfoAsync, isValidFrameInfo, frameIsReplay, checkInjected } from '../ts/chat-utils'; -import { isLiveTL, isAndroid } from '../ts/chat-constants'; +import { isLiveTL } from '../ts/chat-constants'; import { hcEnabled, autoLiveChat } from '../ts/storage'; // const isFirefox = navigator.userAgent.includes('Firefox'); @@ -76,13 +76,6 @@ const chatLoaded = async (): Promise => { } ytcTicker.remove(); - // Hide input panel on android - if (isAndroid) { - const inputPanel = document.querySelector('#input-panel'); - if (!inputPanel) return; - (inputPanel as HTMLElement).style.display = 'none'; - } - if (await autoLiveChat.get()) { const live = document.querySelector('tp-yt-paper-listbox#menu > :nth-child(2)'); if (!live) { diff --git a/src/ts/chat-constants.ts b/src/ts/chat-constants.ts index e306636b..3525ceed 100644 --- a/src/ts/chat-constants.ts +++ b/src/ts/chat-constants.ts @@ -1,21 +1,16 @@ export const isLiveTL = false; -export const isAndroid = false; // DO NOT EDIT THE ABOVE LINE. It is updated by webpack. export const enum Browser { FIREFOX, CHROME, - SAFARI, - ANDROID + SAFARI } export const getBrowser = (): Browser => { if (navigator.userAgent.includes('Firefox')) { return Browser.FIREFOX; } - if (isAndroid || window.chrome == null) { - return Browser.ANDROID; - } if (/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) { return Browser.SAFARI; }