mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 19:47:04 +03:00
Updated it to make it work in the info menu (on page popup).
This commit is contained in:
2
popup.js
2
popup.js
@@ -1,7 +1,7 @@
|
|||||||
localizeHtmlPage();
|
|
||||||
|
|
||||||
//make this a function to allow this to run on the content page
|
//make this a function to allow this to run on the content page
|
||||||
function runThePopup() {
|
function runThePopup() {
|
||||||
|
localizeHtmlPage();
|
||||||
|
|
||||||
//is it in the popup or content script
|
//is it in the popup or content script
|
||||||
var inPopup = true;
|
var inPopup = true;
|
||||||
|
|||||||
5
utils.js
5
utils.js
@@ -49,9 +49,8 @@ function getYouTubeVideoID(url) {
|
|||||||
|
|
||||||
function localizeHtmlPage() {
|
function localizeHtmlPage() {
|
||||||
//Localize by replacing __MSG_***__ meta tags
|
//Localize by replacing __MSG_***__ meta tags
|
||||||
var objects = document.getElementsByTagName('html');
|
var objects = document.getElementsByClassName("popupBody")[0].children;
|
||||||
for (var j = 0; j < objects.length; j++)
|
for (var j = 0; j < objects.length; j++) {
|
||||||
{
|
|
||||||
var obj = objects[j];
|
var obj = objects[j];
|
||||||
|
|
||||||
var valStrH = obj.innerHTML.toString();
|
var valStrH = obj.innerHTML.toString();
|
||||||
|
|||||||
Reference in New Issue
Block a user