Updated it to make it work in the info menu (on page popup).

This commit is contained in:
Ajay Ramachandran 2019-08-27 21:10:35 -04:00
parent 284efe9902
commit 32dd7d43d7
2 changed files with 3 additions and 4 deletions

View file

@ -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;

View file

@ -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();