mirror of
https://github.com/ajayyy/SponsorBlock.git
synced 2025-12-06 11:37:02 +03:00
Fix background colour in popup
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>__MSG_openPopup__</title>
|
||||
<link id="sponsorBlockPopupFont" rel="stylesheet" type="text/css" href="/libs/Source+Sans+Pro.css">
|
||||
@@ -137,6 +135,4 @@
|
||||
<!-- Scripts that need to load after the html -->
|
||||
<script src="./js/vendor.js" async></script>
|
||||
<script src="./js/popup.js" async></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</body>
|
||||
@@ -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(/<head>[\S\s]*<\/head>/gi, "");
|
||||
// Hack to replace body tag with div
|
||||
htmlData = htmlData.replace(/<body/gi, "<div");
|
||||
htmlData = htmlData.replace(/<\/body/gi, "</div");
|
||||
|
||||
console.log(htmlData)
|
||||
|
||||
popup.innerHTML = htmlData;
|
||||
|
||||
//close button
|
||||
let closeButton = document.createElement("div");
|
||||
@@ -1313,10 +1323,6 @@ function openInfoMenu() {
|
||||
check.src = chrome.extension.getURL("icons/check.svg");
|
||||
check.src = chrome.extension.getURL("icons/thumb.svg");
|
||||
|
||||
//remove the style sheet and font that are not necessary
|
||||
popup.querySelector("#sponsorBlockPopupFont").remove();
|
||||
popup.querySelector("#sponsorBlockStyleSheet").remove();
|
||||
|
||||
parentNode.insertBefore(popup, parentNode.firstChild);
|
||||
|
||||
//run the popup init script
|
||||
|
||||
Reference in New Issue
Block a user