aboutsummaryrefslogtreecommitdiffhomepage
path: root/content.js
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-09-02 10:54:49 -0400
committerAjay Ramachandran <[email protected]>2019-09-02 10:54:49 -0400
commit7deea5d64876a13a7b10ab2f7f2c2278c0d78c30 (patch)
tree844f89ac027aa1c34a56386ff2c07f61dbae110b /content.js
parentf310c53f88ada2cb4db001b8f6833a3d659126b1 (diff)
downloadSponsorBlock-7deea5d64876a13a7b10ab2f7f2c2278c0d78c30.tar.gz
SponsorBlock-7deea5d64876a13a7b10ab2f7f2c2278c0d78c30.zip
Made getChannelID only get called if there is a valid YouTube page.
Diffstat (limited to 'content.js')
-rw-r--r--content.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/content.js b/content.js
index f0ca78d0..fb0b13b0 100644
--- a/content.js
+++ b/content.js
@@ -240,12 +240,12 @@ function videoIDChange(id) {
resetValues();
- let channelIDPromise = wait(getChannelID);
- channelIDPromise.then(() => channelIDPromise.isFulfilled = true).catch(() => channelIDPromise.isRejected = true)
-
//id is not valid
if (!id) return;
+ let channelIDPromise = wait(getChannelID);
+ channelIDPromise.then(() => channelIDPromise.isFulfilled = true).catch(() => channelIDPromise.isRejected = true);
+
//setup the preview bar
if (previewBar == null) {
//create it