From b47a71c000515bebbf60d7c6c2c5e6d04fff7863 Mon Sep 17 00:00:00 2001 From: opl- Date: Sun, 15 Nov 2020 00:36:31 +0100 Subject: [PATCH] Remove unused popup related code --- src/content.ts | 21 --------------------- src/popup.ts | 21 +-------------------- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/src/content.ts b/src/content.ts index 1be5e1c4..cded9c45 100644 --- a/src/content.ts +++ b/src/content.ts @@ -145,27 +145,6 @@ function messageListener(request: any, sender: any, sendResponse: (response: any videoID: sponsorVideoID }); - break; - case "getVideoDuration": - sendResponse({ - duration: video.duration - }); - - break; - case "skipToTime": - video.currentTime = request.time; - - // Unpause the video if needed - if (video.paused){ - video.play(); - } - - return; - case "getCurrentTime": - sendResponse({ - currentTime: getRealCurrentTime() - }); - break; case "getChannelID": sendResponse({ diff --git a/src/popup.ts b/src/popup.ts index e92c3c53..1ccc7cae 100644 --- a/src/popup.ts +++ b/src/popup.ts @@ -584,7 +584,7 @@ async function runThePopup(messageListener?: MessageListener): Promise { } }); } - + //converts time in seconds to minutes:seconds function getFormattedTime(seconds) { const minutes = Math.floor(seconds / 60); @@ -715,25 +715,6 @@ async function runThePopup(messageListener?: MessageListener): Promise { hiddenButton.style.display = "none"; } - //converts time in seconds to minutes - function getTimeInMinutes(seconds) { - const minutes = Math.floor(seconds / 60); - - return minutes; - } - - //converts time in seconds to seconds past the last minute - function getTimeInFormattedSeconds(seconds) { - const minutes = seconds % 60; - let secondsFormatted = minutes.toFixed(3); - - if (minutes < 10) { - secondsFormatted = "0" + secondsFormatted; - } - - return secondsFormatted; - } - /** * Converts time in hours to 5h 25.1 * If less than 1 hour, just returns minutes