mirror of
https://github.com/zombieFox/nightTab.git
synced 2025-08-16 00:38:02 +02:00
[refactor] remove initial background module as it could load after main code and remove styles
This commit is contained in:
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nightTab",
|
"name": "nightTab",
|
||||||
"version": "5.75.1",
|
"version": "5.76.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nightTab",
|
"name": "nightTab",
|
||||||
"version": "5.75.1",
|
"version": "5.76.0",
|
||||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
@ -24,8 +24,6 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script src="js/initial-background.js" async></script>
|
|
||||||
|
|
||||||
@@include("./html/link-css.html")
|
@@include("./html/link-css.html")
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
@ -1,15 +0,0 @@
|
|||||||
// inital check for systems which do not have light or dark mode
|
|
||||||
var nightTabData = JSON.parse(localStorage.getItem("nightTab"));
|
|
||||||
if (window.matchMedia("(prefers-color-scheme:light)").matches) {
|
|
||||||
if (nightTabData) {
|
|
||||||
if (nightTabData.state.theme.style == "dark") {
|
|
||||||
document.querySelector("html").setAttribute("style", "background-color:rgb(0,0,0)");
|
|
||||||
};
|
|
||||||
};
|
|
||||||
} else if (window.matchMedia("(prefers-color-scheme:dark)").matches) {
|
|
||||||
if (nightTabData) {
|
|
||||||
if (nightTabData.state.theme.style == "light") {
|
|
||||||
document.querySelector("html").setAttribute("style", "background-color:rgb(255,255,255)");
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
@ -1,6 +1,6 @@
|
|||||||
var version = (function() {
|
var version = (function() {
|
||||||
|
|
||||||
var current = "5.75.1";
|
var current = "5.76.0";
|
||||||
|
|
||||||
var name = "Jaded Raven";
|
var name = "Jaded Raven";
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"name": "nightTab",
|
"name": "nightTab",
|
||||||
"short_name": "nightTab",
|
"short_name": "nightTab",
|
||||||
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
"description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.",
|
||||||
"version": "5.75.1",
|
"version": "5.76.0",
|
||||||
"manifest_version": 2,
|
"manifest_version": 2,
|
||||||
"chrome_url_overrides": {
|
"chrome_url_overrides": {
|
||||||
"newtab": "index.html"
|
"newtab": "index.html"
|
||||||
|
Reference in New Issue
Block a user