[feature] use prefered colour scheme to set initial page to black or white

This commit is contained in:
zombieFox
2020-07-24 09:55:02 +01:00
parent bf327a41c6
commit 8caa9bbeee
5 changed files with 23 additions and 5 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "nightTab", "name": "nightTab",
"version": "5.64.0", "version": "5.65.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "nightTab", "name": "nightTab",
"version": "5.64.0", "version": "5.65.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": {

View File

@ -1,11 +1,29 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" style="background-color: rgb(25, 25, 25)"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<title>New Tab</title> <title>New Tab</title>
<style media="screen">
@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>
@@include("./html/link-css.html") @@include("./html/link-css.html")
</head> </head>

View File

@ -1,6 +1,6 @@
var version = (function() { var version = (function() {
var current = "5.64.0"; var current = "5.65.0";
var name = "Jaded Raven"; var name = "Jaded Raven";

View File

@ -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.64.0", "version": "5.65.0",
"manifest_version": 2, "manifest_version": 2,
"chrome_url_overrides": { "chrome_url_overrides": {
"newtab": "index.html" "newtab": "index.html"