mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
fix
This commit is contained in:
parent
e35774138f
commit
c65e3c21e3
1 changed files with 5 additions and 14 deletions
19
content.js
19
content.js
|
@ -70,11 +70,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 the notice should not be shown
|
|
||||||
//happens when the user click's the "Don't show notice again" button
|
|
||||||
//option renamed when new notice was made
|
|
||||||
dontShowNoticeAgain = SB.config.dontShowNoticeAgain;
|
|
||||||
|
|
||||||
//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);
|
||||||
|
|
||||||
|
@ -148,15 +143,16 @@ function messageListener(request, sender, sendResponse) {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "dontShowNotice":
|
case "dontShowNotice":
|
||||||
dontShowNotice = false;
|
SB.config.dontShowNotice = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "changeStartSponsorButton":
|
case "changeStartSponsorButton":
|
||||||
changeStartSponsorButton(request.showStartSponsor, request.uploadButtonVisible);
|
changeStartSponsorButton(request.showStartSponsor, request.uploadButtonVisible);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "showNoticeAgain":
|
case "showNoticeAgain":
|
||||||
dontShowNotice = false;
|
SB.config.dontShowNotice = true;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "changeVideoPlayerControlsVisibility":
|
case "changeVideoPlayerControlsVisibility":
|
||||||
|
@ -568,16 +564,14 @@ function skipToTime(v, index, sponsorTimes, openNotice) {
|
||||||
|
|
||||||
if (openNotice) {
|
if (openNotice) {
|
||||||
//send out the message saying that a sponsor message was skipped
|
//send out the message saying that a sponsor message was skipped
|
||||||
if (!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 (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"));
|
||||||
|
|
||||||
//remove this setting
|
SB.config.dontShowNotice = false;
|
||||||
delete SB.config["dontShowNoticeAgain"];
|
|
||||||
dontShowNoticeOld = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//auto-upvote this sponsor
|
//auto-upvote this sponsor
|
||||||
|
@ -918,9 +912,6 @@ function closeAllSkipNotices(){
|
||||||
|
|
||||||
function dontShowNoticeAgain() {
|
function dontShowNoticeAgain() {
|
||||||
SB.config.dontShowNotice = true;
|
SB.config.dontShowNotice = true;
|
||||||
|
|
||||||
dontShowNotice = true;
|
|
||||||
|
|
||||||
closeAllSkipNotices();
|
closeAllSkipNotices();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue