diff --git a/SB.js b/SB.js index 0e0f82e1..a7f8d048 100644 --- a/SB.js +++ b/SB.js @@ -161,6 +161,7 @@ SB.defaults = { "hideDiscordLaunches": 0, "hideDiscordLink": false, "invidiousInstances": ["invidio.us", "invidiou.sh", "invidious.snopyta.org"], + "invidiousUpdateInfoShowCount": 0, "autoUpvote": true } diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 4157ae1c..eab70b4e 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -380,5 +380,11 @@ }, "whatAutoUpvote": { "message": "With this enabled, the extension will upvote all submissions you view if you do not report them. If the notice is disabled, this will not occur." + }, + "invidiousInfo1": { + "message": "Invidious (the 3rd party YouTube site) support has been added!" + }, + "invidiousInfo2": { + "message": "You MUST enable it in the options for it to work." } } diff --git a/background.js b/background.js index 7dcbd61d..0227ef19 100644 --- a/background.js +++ b/background.js @@ -74,7 +74,11 @@ chrome.runtime.onInstalled.addListener(function (object) { //generate a userID const newUserID = generateUserID(); //save this UUID - SB.config.userID = newUserID; + SB.config.userID = newUserID; + + //TODO: Remove when invidious support is old + // Don't show this to new users + SB.config.invidiousUpdateInfoShowCount = 6; } }, 1500); }); diff --git a/content.js b/content.js index 1d85de16..f3b96fe0 100644 --- a/content.js +++ b/content.js @@ -557,6 +557,13 @@ function skipToTime(v, index, sponsorTimes, openNotice) { if (!SB.config.dontShowNotice) { let skipNotice = new SkipNotice(this, currentUUID, SB.config.disableAutoSkip); + //TODO: Remove this when Invidious support is old + if (SB.config.invidiousUpdateInfoShowCount < 5) { + skipNotice.addNoticeInfoMessage(chrome.i18n.getMessage("invidiousInfo1"), chrome.i18n.getMessage("invidiousInfo2")); + + SB.config.invidiousUpdateInfoShowCount += 1; + } + //auto-upvote this sponsor if (SB.config.trackViewCount && !SB.config.disableAutoSkip && SB.config.autoUpvote) { vote(1, currentUUID, null);