mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-07 03:57:09 +03:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ddf3f7c6ff | ||
|
|
fbcff7f4c4 | ||
|
|
257098fd96 | ||
|
|
0403393124 | ||
|
|
11144fa77b | ||
|
|
dc5ecaded4 | ||
|
|
60ae3111c2 | ||
|
|
9f0f306439 | ||
|
|
8b7436320f | ||
|
|
7498c6cf1b |
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "__MSG_fullName__",
|
||||
"short_name": "SponsorBlock",
|
||||
"version": "2.0.14",
|
||||
"version": "2.0.14.2",
|
||||
"default_locale": "en",
|
||||
"description": "__MSG_Description__",
|
||||
"content_scripts": [{
|
||||
|
||||
12
package-lock.json
generated
12
package-lock.json
generated
@@ -7984,9 +7984,9 @@
|
||||
}
|
||||
},
|
||||
"hosted-git-info": {
|
||||
"version": "2.8.5",
|
||||
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz",
|
||||
"integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg=="
|
||||
"version": "2.8.9",
|
||||
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
|
||||
"integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw=="
|
||||
},
|
||||
"html-encoding-sniffer": {
|
||||
"version": "2.0.1",
|
||||
@@ -11692,9 +11692,9 @@
|
||||
}
|
||||
},
|
||||
"lodash": {
|
||||
"version": "4.17.19",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
|
||||
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
|
||||
"version": "4.17.21",
|
||||
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
|
||||
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
|
||||
},
|
||||
"lodash.defaults": {
|
||||
"version": "4.2.0",
|
||||
|
||||
@@ -591,8 +591,8 @@
|
||||
"channelDataNotFound": {
|
||||
"message": "Channel ID not loaded yet."
|
||||
},
|
||||
"adblockerIssue": {
|
||||
"message": "It seems that something is blocking SponsorBlock's ability to get video data. This is probably your ad blocker. Please check https://github.com/ajayyy/SponsorBlock/wiki/Fix-Ad-Blocker-Blocking-SponsorBlock's-Requests"
|
||||
"videoInfoFetchFailed": {
|
||||
"message": "It seems that something is blocking SponsorBlock's ability to get video data. Please see https://github.com/ajayyy/SponsorBlock/issues/741 for more info."
|
||||
},
|
||||
"youtubePermissionRequest": {
|
||||
"message": "It seems that SponsorBlock is unable to reach the YouTube API. To fix this, accept the permission prompt that will appear next, wait a few seconds, and then reload the page."
|
||||
@@ -601,7 +601,7 @@
|
||||
"message": "Accept permission"
|
||||
},
|
||||
"permissionRequestSuccess": {
|
||||
"message": "Permission success succeeded!"
|
||||
"message": "Permission request succeeded!"
|
||||
},
|
||||
"permissionRequestFailed": {
|
||||
"message": "Permission request failed, did you click deny?"
|
||||
@@ -610,7 +610,7 @@
|
||||
"message": "If you are unable to resolve this, then disable the setting 'Ignore unlisted/private videos', as SponsorBlock is unable to retrieve the visibility information for this video"
|
||||
},
|
||||
"adblockerIssueWhitelist": {
|
||||
"message": "If you are unable to resolve this, then disable the setting 'Force Channel Check Before Skipping', as SponsorBlock is unable to retrieve the visibility information for this video"
|
||||
"message": "If you are unable to resolve this, then disable the setting 'Force Channel Check Before Skipping', as SponsorBlock is unable to retrieve the channel information for this video"
|
||||
},
|
||||
"itCouldBeAdblockerIssue": {
|
||||
"message": "If this keeps occuring, it could be caused by your ad blocker. Please check https://github.com/ajayyy/SponsorBlock/wiki/Fix-Ad-Blocker-Blocking-SponsorBlock's-Requests"
|
||||
|
||||
@@ -36,6 +36,7 @@ interface SBConfig {
|
||||
testingServer: boolean,
|
||||
hashPrefix: boolean,
|
||||
refetchWhenNotFound: boolean,
|
||||
ytInfoPermissionGranted: boolean,
|
||||
|
||||
// What categories should be skipped
|
||||
categorySelections: CategorySelection[],
|
||||
@@ -169,6 +170,7 @@ const Config: SBObject = {
|
||||
testingServer: false,
|
||||
hashPrefix: true,
|
||||
refetchWhenNotFound: true,
|
||||
ytInfoPermissionGranted: false,
|
||||
|
||||
categorySelections: [{
|
||||
name: "sponsor",
|
||||
|
||||
@@ -733,7 +733,7 @@ async function getVideoInfo(): Promise<void> {
|
||||
|
||||
async function videoInfoFetchFailed(errorMessage: string): Promise<void> {
|
||||
console.log("failed\t" + errorMessage)
|
||||
if (utils.isFirefox()) {
|
||||
if (utils.isFirefox() && !Config.config.ytInfoPermissionGranted) {
|
||||
// Attempt to ask permission for youtube.com domain
|
||||
alert(chrome.i18n.getMessage("youtubePermissionRequest"));
|
||||
|
||||
@@ -742,7 +742,7 @@ async function videoInfoFetchFailed(errorMessage: string): Promise<void> {
|
||||
url: "permissions/index.html#youtube.com"
|
||||
});
|
||||
} else {
|
||||
alert(chrome.i18n.getMessage("adblockerIssue") + "\n\n" + chrome.i18n.getMessage(errorMessage));
|
||||
alert(chrome.i18n.getMessage("videoInfoFetchFailed") + "\n\n" + chrome.i18n.getMessage(errorMessage));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ async function init() {
|
||||
if (granted) {
|
||||
alert(chrome.i18n.getMessage("permissionRequestSuccess"));
|
||||
|
||||
Config.config.ytInfoPermissionGranted = true;
|
||||
|
||||
chrome.tabs.getCurrent((tab) => {
|
||||
chrome.tabs.remove(tab.id);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user