aboutsummaryrefslogtreecommitdiffhomepage
path: root/content.js
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-08-22 23:12:30 -0400
committerAjay Ramachandran <[email protected]>2019-08-22 23:12:30 -0400
commit2fbafb6b10ccaccd0676a5e8976198ed7c20fbdb (patch)
treea9a2bb9e3c7b941edb408c68403694295191ce1c /content.js
parent98eb72ef1f4aab9f4f9b74f2eb2e057fd32613db (diff)
downloadSponsorBlock-2fbafb6b10ccaccd0676a5e8976198ed7c20fbdb.tar.gz
SponsorBlock-2fbafb6b10ccaccd0676a5e8976198ed7c20fbdb.zip
Added duration check to popup as well.
Diffstat (limited to 'content.js')
-rw-r--r--content.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/content.js b/content.js
index 303b4d41..c63ef7c5 100644
--- a/content.js
+++ b/content.js
@@ -128,6 +128,12 @@ function messageListener(request, sender, sendResponse) {
})
}
+ if (request.message == "getVideoDuration") {
+ sendResponse({
+ duration: v.duration
+ });
+ }
+
if (request.message == "skipToTime") {
v.currentTime = request.time;
}
@@ -964,6 +970,8 @@ function submitSponsorTimes() {
sponsorTimes[i][1] = v.duration;
}
}
+ //update sponsorTimes
+ chrome.storage.sync.set({[sponsorTimeKey]: sponsorTimes});
let confirmMessage = chrome.i18n.getMessage("submitCheck") + "\n\n" + getSponsorTimesMessage(sponsorTimes);
confirmMessage += "\n\n" + chrome.i18n.getMessage("confirmMSG");