diff options
author | opl- <[email protected]> | 2020-11-15 00:36:31 +0100 |
---|---|---|
committer | opl- <[email protected]> | 2020-12-14 20:16:45 +0100 |
commit | b47a71c000515bebbf60d7c6c2c5e6d04fff7863 (patch) | |
tree | c9c236311268578772f2281df713ab6047b76736 /src | |
parent | 59826aae6d1e90fc777ddf57acc2482d0fde5f53 (diff) | |
download | SponsorBlock-b47a71c000515bebbf60d7c6c2c5e6d04fff7863.tar.gz SponsorBlock-b47a71c000515bebbf60d7c6c2c5e6d04fff7863.zip |
Remove unused popup related code
Diffstat (limited to 'src')
-rw-r--r-- | src/content.ts | 21 | ||||
-rw-r--r-- | src/popup.ts | 21 |
2 files changed, 1 insertions, 41 deletions
diff --git a/src/content.ts b/src/content.ts index 1be5e1c4..cded9c45 100644 --- a/src/content.ts +++ b/src/content.ts @@ -146,27 +146,6 @@ function messageListener(request: any, sender: any, sendResponse: (response: any }); 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({ channelID: channelID 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<void> { } }); } - + //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<void> { 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 |