Update content.js

This commit is contained in:
Official Noob
2020-01-01 14:30:23 +00:00
committed by GitHub
parent 0241c0a036
commit 6f682baa45

View File

@@ -65,10 +65,6 @@ var sponsorTimesSubmitting = [];
//this is used to close the popup on YouTube when the other popup opens //this is used to close the popup on YouTube when the other popup opens
var popupInitialised = false; var popupInitialised = false;
if (SB.config.dontShowNotice) {
SB.config.dontShowNoticeOld = true;
}
//get messages from the background script and the popup //get messages from the background script and the popup
chrome.runtime.onMessage.addListener(messageListener); chrome.runtime.onMessage.addListener(messageListener);
@@ -77,7 +73,6 @@ function messageListener(request, sender, sendResponse) {
switch(request.message){ switch(request.message){
case "update": case "update":
videoIDChange(getYouTubeVideoID(document.URL)); videoIDChange(getYouTubeVideoID(document.URL));
break; break;
case "sponsorStart": case "sponsorStart":
sponsorMessageStarted(sendResponse); sponsorMessageStarted(sendResponse);
@@ -549,11 +544,10 @@ function skipToTime(v, index, sponsorTimes, openNotice) {
if (!SB.config.dontShowNotice) { if (!SB.config.dontShowNotice) {
let skipNotice = new SkipNotice(this, currentUUID, SB.config.disableAutoSkip); let skipNotice = new SkipNotice(this, currentUUID, SB.config.disableAutoSkip);
if (dontShowNoticeOld) { if (!SB.config.dontShowNoticeOld) {
//show why this notice is showing //show why this notice is showing
skipNotice.addNoticeInfoMessage(chrome.i18n.getMessage("noticeUpdate"), chrome.i18n.getMessage("noticeUpdate2")); skipNotice.addNoticeInfoMessage(chrome.i18n.getMessage("noticeUpdate"), chrome.i18n.getMessage("noticeUpdate2"));
SB.config.dontShowNoticeOld = true;
SB.config.dontShowNotice = false;
} }
//auto-upvote this sponsor //auto-upvote this sponsor