mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 09:07:45 +01:00
Added notice info about the Invidious update. TODO: remove this in the future.
This commit is contained in:
parent
4f8e1bc827
commit
259f7a9439
4 changed files with 19 additions and 1 deletions
1
SB.js
1
SB.js
|
@ -161,6 +161,7 @@ SB.defaults = {
|
|||
"hideDiscordLaunches": 0,
|
||||
"hideDiscordLink": false,
|
||||
"invidiousInstances": ["invidio.us", "invidiou.sh", "invidious.snopyta.org"],
|
||||
"invidiousUpdateInfoShowCount": 0,
|
||||
"autoUpvote": true
|
||||
}
|
||||
|
||||
|
|
|
@ -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."
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue