mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2024-11-10 01:01:55 +01:00
Updated it to make it work in the info menu (on page popup).
This commit is contained in:
parent
284efe9902
commit
32dd7d43d7
2 changed files with 3 additions and 4 deletions
2
popup.js
2
popup.js
|
@ -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;
|
||||
|
|
5
utils.js
5
utils.js
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue