Merge pull request #859 from rakleed/dark-scrollbar

Make dark scroll bar in Chromium-based browsers
This commit is contained in:
Ajay Ramachandran 2021-07-27 15:09:28 -04:00 committed by GitHub
commit 1656fae2d4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 159 additions and 137 deletions

View file

@ -1,3 +1,7 @@
html {
color-scheme: dark;
}
.bigText {
font-size: 50px;
}

View file

@ -1,4 +1,8 @@
/* Options page CSS */
html {
color-scheme: dark;
}
body {
font-family: sans-serif;
}

View file

@ -1,4 +1,8 @@
/* Options page CSS */
html {
color-scheme: dark;
}
body {
font-family: sans-serif;
}

View file

@ -6,6 +6,10 @@
--sb-green-bg: #077B27;
}
#sponsorBlockPopupHTML {
color-scheme: dark;
}
#sponsorBlockPopupBody .hidden {
display: none !important;
}
@ -28,6 +32,8 @@
margin: auto;
width: 374px;
background: var(--sb-main-bg-color);
color-scheme: dark;
}
#sponsorblockPopup {

View file

@ -1,12 +1,13 @@
<head>
<html id="sponsorBlockPopupHTML">
<head>
<title>__MSG_openPopup__</title>
<link id="sponsorBlockPopupFont" rel="stylesheet" type="text/css" href="/libs/Source+Sans+Pro.css">
<link id="sponsorBlockStyleSheet" rel="stylesheet" type="text/css" href="popup.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
</head>
<body id="sponsorBlockPopupBody">
<body id="sponsorBlockPopupBody">
<div id="sponsorblockPopup" class="sponsorBlockPageBody preload">
<div class="logoText bottomSpace">
<img src="icons/IconSponsorBlocker256px.png" height="40px" id="sponsorBlockPopupLogo">
@ -149,4 +150,5 @@
<!-- Scripts that need to load after the html -->
<script src="./js/vendor.js" async></script>
<script src="./js/popup.js" async></script>
</body>
</body>
</html>

View file

@ -1318,9 +1318,11 @@ function openInfoMenu() {
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
// Hack to replace body and html tag with div
htmlData = htmlData.replace(/<body/gi, "<div");
htmlData = htmlData.replace(/<\/body/gi, "</div");
htmlData = htmlData.replace(/<html/gi, "<div");
htmlData = htmlData.replace(/<\/html/gi, "</div");
popup.innerHTML = htmlData;