aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAjay Ramachandran <[email protected]>2019-09-02 21:33:36 -0400
committerGitHub <[email protected]>2019-09-02 21:33:36 -0400
commit1782376e3d709e4e99e89f0a57e101e848d0a749 (patch)
treebcf3ca252f5e16579fe3d50497a9b3865edfbd3f
parentc6460b006f946df85abe980ad6549462854355f4 (diff)
parentef1b96bbf17d38aad32cde10997524fcd841135b (diff)
downloadSponsorBlock-1782376e3d709e4e99e89f0a57e101e848d0a749.tar.gz
SponsorBlock-1782376e3d709e4e99e89f0a57e101e848d0a749.zip
Merge pull request #145 from ajayyy/experimental-ajay1.1.9
Fixed info button + videoChannelID errors
-rw-r--r--content.js15
-rw-r--r--manifest.json2
2 files changed, 12 insertions, 5 deletions
diff --git a/content.js b/content.js
index 1cb7c30e..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
@@ -791,11 +791,18 @@ function openInfoMenu() {
//add the close button
popup.prepend(closeButton);
- let parentNode = document.getElementById("secondary");
+ let parentNodes = document.querySelectorAll("#secondary");
+ let parentNode = null;
+ for (let i = 0; i < parentNodes.length; i++) {
+ if (parentNodes[i].firstElementChild !== null) {
+ parentNode = parentNodes[i];
+ }
+ }
if (parentNode == null) {
//old youtube theme
parentNode = document.getElementById("watch7-sidebar-contents");
}
+
//make the logo source not 404
//query selector must be used since getElementByID doesn't work on a node and this isn't added to the document yet
diff --git a/manifest.json b/manifest.json
index ee61dd28..10778193 100644
--- a/manifest.json
+++ b/manifest.json
@@ -1,7 +1,7 @@
{
"name": "__MSG_fullName__",
"short_name": "__MSG_Name__",
- "version": "1.1.8",
+ "version": "1.1.9",
"default_locale": "en",
"description": "__MSG_Description__",
"content_scripts": [