mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-12 14:37:23 +03:00
Added notice info about the Invidious update. TODO: remove this in the future.
This commit is contained in:
1
SB.js
1
SB.js
@@ -161,6 +161,7 @@ SB.defaults = {
|
|||||||
"hideDiscordLaunches": 0,
|
"hideDiscordLaunches": 0,
|
||||||
"hideDiscordLink": false,
|
"hideDiscordLink": false,
|
||||||
"invidiousInstances": ["invidio.us", "invidiou.sh", "invidious.snopyta.org"],
|
"invidiousInstances": ["invidio.us", "invidiou.sh", "invidious.snopyta.org"],
|
||||||
|
"invidiousUpdateInfoShowCount": 0,
|
||||||
"autoUpvote": true
|
"autoUpvote": true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -380,5 +380,11 @@
|
|||||||
},
|
},
|
||||||
"whatAutoUpvote": {
|
"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."
|
"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
|
//generate a userID
|
||||||
const newUserID = generateUserID();
|
const newUserID = generateUserID();
|
||||||
//save this UUID
|
//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);
|
}, 1500);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -557,6 +557,13 @@ 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);
|
||||||
|
|
||||||
|
//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
|
//auto-upvote this sponsor
|
||||||
if (SB.config.trackViewCount && !SB.config.disableAutoSkip && SB.config.autoUpvote) {
|
if (SB.config.trackViewCount && !SB.config.disableAutoSkip && SB.config.autoUpvote) {
|
||||||
vote(1, currentUUID, null);
|
vote(1, currentUUID, null);
|
||||||
|
|||||||
Reference in New Issue
Block a user