refactor(lint): fix trivial linting errors

This commit is contained in:
Max Baumann
2020-12-12 23:58:34 +01:00
parent 36558f5460
commit e2ef7412a4
16 changed files with 120 additions and 101 deletions

View File

@@ -38,7 +38,7 @@ class MessageHandler {
}
//make this a function to allow this to run on the content page
async function runThePopup(messageListener?: MessageListener) {
async function runThePopup(messageListener?: MessageListener): Promise<void> {
const messageHandler = new MessageHandler(messageListener);
utils.localizeHtmlPage();
@@ -233,17 +233,17 @@ async function runThePopup(messageListener?: MessageListener) {
}, onTabs);
function onTabs(tabs) {
messageHandler.sendMessage(tabs[0].id, {message: 'getVideoID'}, function(result) {
if (result != undefined && result.videoID) {
currentVideoID = result.videoID;
loadTabData(tabs);
} else if (result == undefined && chrome.runtime.lastError) {
//this isn't a YouTube video then, or at least the content script is not loaded
displayNoVideo();
}
});
messageHandler.sendMessage(tabs[0].id, {message: 'getVideoID'}, function(result) {
if (result != undefined && result.videoID) {
currentVideoID = result.videoID;
loadTabData(tabs);
} else if (result == undefined && chrome.runtime.lastError) {
// this isn't a YouTube video then, or at least the content script is not loaded
displayNoVideo();
}
});
}
function loadTabData(tabs) {
if (!currentVideoID) {
//this isn't a YouTube video then