diff options
author | Ajay Ramachandran <[email protected]> | 2019-08-27 21:10:35 -0400 |
---|---|---|
committer | Ajay Ramachandran <[email protected]> | 2019-08-27 21:10:35 -0400 |
commit | 32dd7d43d7fc4928a94579c397b475fcbebfea5e (patch) | |
tree | 0c92cb791d7cac3455fbfa9d838335a239ad2719 | |
parent | 284efe990252f1a7964fd8b01c874173b4a33198 (diff) | |
download | SponsorBlock-32dd7d43d7fc4928a94579c397b475fcbebfea5e.tar.gz SponsorBlock-32dd7d43d7fc4928a94579c397b475fcbebfea5e.zip |
Updated it to make it work in the info menu (on page popup).
-rw-r--r-- | popup.js | 2 | ||||
-rw-r--r-- | utils.js | 5 |
2 files changed, 3 insertions, 4 deletions
@@ -1,7 +1,7 @@ -localizeHtmlPage(); //make this a function to allow this to run on the content page function runThePopup() { + localizeHtmlPage(); //is it in the popup or content script var inPopup = true; @@ -49,9 +49,8 @@ function getYouTubeVideoID(url) { function localizeHtmlPage() { //Localize by replacing __MSG_***__ meta tags - var objects = document.getElementsByTagName('html'); - for (var j = 0; j < objects.length; j++) - { + var objects = document.getElementsByClassName("popupBody")[0].children; + for (var j = 0; j < objects.length; j++) { var obj = objects[j]; var valStrH = obj.innerHTML.toString(); |