Added mobile support message.

This commit is contained in:
Ajay Ramachandran
2020-02-23 20:39:13 -05:00
parent 5551344355
commit 737a023b65
4 changed files with 17 additions and 12 deletions

View File

@@ -381,12 +381,6 @@
"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."
},
"minDuration": { "minDuration": {
"message": "Minimum duration (seconds):" "message": "Minimum duration (seconds):"
}, },
@@ -431,5 +425,8 @@
}, },
"betaName": { "betaName": {
"message": "BETA - SponsorBlock" "message": "BETA - SponsorBlock"
},
"mobileUpdateInfo": {
"message": "m.youtube.com is now supported"
} }
} }

View File

@@ -86,9 +86,9 @@ chrome.runtime.onInstalled.addListener(function (object) {
//save this UUID //save this UUID
Config.config.userID = newUserID; Config.config.userID = newUserID;
//TODO: Remove when invidious support is old //TODO: Remove when mobile support is old
// Don't show this to new users // Don't show this to new users
Config.config.invidiousUpdateInfoShowCount = 6; // Config.config.mobileUpdateShowCount = 1;
} }
}, 1500); }, 1500);
}); });

View File

@@ -20,12 +20,12 @@ interface SBConfig {
hideDiscordLaunches: number, hideDiscordLaunches: number,
hideDiscordLink: boolean, hideDiscordLink: boolean,
invidiousInstances: string[], invidiousInstances: string[],
invidiousUpdateInfoShowCount: number,
autoUpvote: boolean, autoUpvote: boolean,
supportInvidious: boolean, supportInvidious: boolean,
serverAddress: string, serverAddress: string,
minDuration: number, minDuration: number,
checkForUnlistedVideos: boolean checkForUnlistedVideos: boolean,
mobileUpdateShowCount: number
} }
interface SBObject { interface SBObject {
@@ -116,12 +116,12 @@ var Config: SBObject = {
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,
supportInvidious: false, supportInvidious: false,
serverAddress: CompileConfig.serverAddress, serverAddress: CompileConfig.serverAddress,
minDuration: 0, minDuration: 0,
checkForUnlistedVideos: false checkForUnlistedVideos: false,
mobileUpdateShowCount: 0
}, },
localConfig: null, localConfig: null,
config: null config: null

View File

@@ -819,8 +819,16 @@ 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 (!Config.config.dontShowNotice) { if (!Config.config.dontShowNotice) {
let skipNotice = new SkipNotice(this, currentUUID, Config.config.disableAutoSkip, skipNoticeContentContainer); let skipNotice = new SkipNotice(this, currentUUID, Config.config.disableAutoSkip, skipNoticeContentContainer);
//TODO: Remove this when Mobile support is old
if (Config.config.mobileUpdateShowCount < 1) {
skipNotice.addNoticeInfoMessage(chrome.i18n.getMessage("mobileUpdateInfo"));
Config.config.mobileUpdateShowCount += 1;
}
//auto-upvote this sponsor //auto-upvote this sponsor
if (Config.config.trackViewCount && !Config.config.disableAutoSkip && Config.config.autoUpvote) { if (Config.config.trackViewCount && !Config.config.disableAutoSkip && Config.config.autoUpvote) {
vote(1, currentUUID, null); vote(1, currentUUID, null);