From 637dcbee00e8356fbfcbe9aefe2202642e5f93d3 Mon Sep 17 00:00:00 2001
From: Ajay Ramachandran
\ No newline at end of file diff --git a/src/content.ts b/src/content.ts index e828e34d..33376741 100644 --- a/src/content.ts +++ b/src/content.ts @@ -1273,9 +1273,19 @@ function openInfoMenu() { sendRequestToCustomServer('GET', chrome.extension.getURL("popup.html"), function(xmlhttp) { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { - var popup = document.createElement("div"); + let popup = document.createElement("div"); popup.id = "sponsorBlockPopupContainer"; - popup.innerHTML = xmlhttp.responseText + + let htmlData = xmlhttp.responseText; + // Hack to replace head data (title, favicon) + htmlData = htmlData.replace(/
[\S\s]*<\/head>/gi, ""); + // Hack to replace body tag with div + htmlData = htmlData.replace(/