diff --git a/popup.js b/popup.js index c7fd4b9a..3476747a 100644 --- a/popup.js +++ b/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; diff --git a/utils.js b/utils.js index 2ec274a5..d9ce3a22 100644 --- a/utils.js +++ b/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();