From 4f50ead08d370ece47419f92aca7fd80967d0f06 Mon Sep 17 00:00:00 2001 From: Ajay Ramachandran Date: Wed, 27 Jan 2021 22:27:23 -0500 Subject: Log returned data when video info failed to load --- manifest/manifest.json | 2 +- public/_locales/en/messages.json | 3 +++ src/content.ts | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/manifest/manifest.json b/manifest/manifest.json index 94f10b21..9987c311 100644 --- a/manifest/manifest.json +++ b/manifest/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_fullName__", "short_name": "SponsorBlock", - "version": "2.0.12", + "version": "2.0.12.1", "default_locale": "en", "description": "__MSG_Description__", "content_scripts": [{ diff --git a/public/_locales/en/messages.json b/public/_locales/en/messages.json index d631d2cc..16f9e266 100644 --- a/public/_locales/en/messages.json +++ b/public/_locales/en/messages.json @@ -594,6 +594,9 @@ "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" }, + "adblockerIssueUnlistedVideosInfo": { + "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" + }, "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" }, diff --git a/src/content.ts b/src/content.ts index 1eaea00e..fcfe832f 100644 --- a/src/content.ts +++ b/src/content.ts @@ -258,7 +258,7 @@ async function videoIDChange(id) { try { await utils.wait(() => !!videoInfo, 5000, 1); } catch (err) { - alert(chrome.i18n.getMessage("adblockerIssue")); + alert(chrome.i18n.getMessage("adblockerIssue") + "\n\n" + chrome.i18n.getMessage("adblockerIssueUnlistedVideosInfo")); } if (isUnlisted()) { @@ -719,6 +719,7 @@ async function getVideoInfo(): Promise { const decodedData = decodeURIComponent(result.responseText).match(/player_response=([^&]*)/)[1]; if (!decodedData) { console.error("[SB] Failed at getting video info from YouTube."); + console.error("[SB] Data returned from YouTube: " + result.responseText); return; } -- cgit v1.2.3