mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-01-25 07:19:13 +01:00
improve initial load colour
This commit is contained in:
parent
1d48ba4a04
commit
978ae75ed4
@ -2,13 +2,19 @@
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
|
||||
<title>New Tab</title>
|
||||
<link rel="icon" type="image/svg+xml" href="icon/favicon.svg"/>
|
||||
<style media="screen" type="text/css">@media (prefers-color-scheme: dark) {html,body {background-color: rgb(0, 0, 0);}}@media (prefers-color-scheme: light) {html,body {background-color: rgb(255, 255, 255);}}</style>
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="icon/favicon.svg" />
|
||||
|
||||
<style media="screen" type="text/css">html,body {background-color: rgb(0, 0, 0);}@media (prefers-color-scheme: dark) {html,body {background-color: rgb(0, 0, 0);}}@media (prefers-color-scheme: light) {html,body {background-color: rgb(255, 255, 255);}}</style>
|
||||
|
||||
<script src="initialBackground.js" async></script>
|
||||
|
||||
</head>
|
||||
|
||||
<body></body>
|
||||
|
@ -25,5 +25,3 @@ component.keyboard.init();
|
||||
component.menu.init();
|
||||
|
||||
// component.menu.open();
|
||||
|
||||
// document.addEventListener('focusin', () => { console.log('focused: ', document.activeElement); });
|
||||
|
@ -1,9 +1,9 @@
|
||||
// inital check for systems which do not have light or dark mode
|
||||
if (localStorage.getItem('hexagonTabStyle')) {
|
||||
var style = document.createElement('style');
|
||||
if (localStorage.getItem('nightTabStyle')) {
|
||||
const style = document.createElement('style');
|
||||
style.type = 'text/css';
|
||||
style.media = 'screen';
|
||||
switch (localStorage.getItem('hexagonTabStyle')) {
|
||||
switch (localStorage.getItem('nightTabStyle')) {
|
||||
case 'light':
|
||||
style.innerHTML = 'html, body {background-color: rgb(255, 255, 255);}';
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user