From cb2b45a5d6b1972b20dc715dfdf16320435167e4 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Fri, 15 Apr 2022 05:48:26 -0700 Subject: add option for date colour --- manifest.json | 2 +- options.html | 6 +++++- options.js | 6 ++++++ tempo.js | 4 ++++ 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index 874b07a..6679373 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 2, "name": "Tempo", - "version": "0.8", + "version": "0.9", "description": "Replace new tab page with a clock.", "icons": { diff --git a/options.html b/options.html index 66f64e5..f79c5b1 100644 --- a/options.html +++ b/options.html @@ -13,9 +13,13 @@
-

+

+
+

+ +

diff --git a/options.js b/options.js index 8060e63..a0b6b71 100644 --- a/options.js +++ b/options.js @@ -7,6 +7,7 @@ function saveOptions() { localStorage['timefmt'] = timefmt; localStorage['fg'] = document.getElementById('fg').value; + localStorage['fg_date'] = document.getElementById('fg_date').value; localStorage['bg'] = document.getElementById('bg').value; let status = document.getElementById('status'); @@ -24,6 +25,11 @@ function restoreOptions() { let fg = localStorage['fg']; if (fg) document.getElementById('fg').value = fg; + + let fg_date = localStorage['fg_date']; + if (fg_date) + document.getElementById('fg_date').value = fg_date; + let bg = localStorage['bg']; if (bg) document.getElementById('bg').value = bg; diff --git a/tempo.js b/tempo.js index a18be78..3dcb1b9 100644 --- a/tempo.js +++ b/tempo.js @@ -35,6 +35,10 @@ function startTempo() { if (fg) document.body.style.color = fg; + let fg_date = localStorage['fg_date']; + if (fg_date) + document.getElementById('dateval').style.color = fg_date; + let bg = localStorage['bg']; if (bg) document.body.style.backgroundColor = bg; -- cgit v1.2.3-70-g09d2