mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Update content.js
This commit is contained in:
10
content.js
10
content.js
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user