Remove unused popup related code

This commit is contained in:
opl- 2020-11-15 00:36:31 +01:00
parent 59826aae6d
commit b47a71c000
2 changed files with 1 additions and 41 deletions

View file

@ -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({

View file

@ -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