mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-09 04:57:09 +03:00
Added mobile support message.
This commit is contained in:
@@ -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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user