diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-15 05:48:26 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-15 05:48:26 -0700 |
commit | cb2b45a5d6b1972b20dc715dfdf16320435167e4 (patch) | |
tree | 2103bdd84e0f74d967f3ba9bb567b4ca834c27a2 | |
parent | 566ea4b8b6a5c9f16cbeb280c73df836fee741fe (diff) | |
download | tempo-cb2b45a5d6b1972b20dc715dfdf16320435167e4.tar.gz tempo-cb2b45a5d6b1972b20dc715dfdf16320435167e4.tar.xz |
add option for date colour
-rw-r--r-- | manifest.json | 2 | ||||
-rw-r--r-- | options.html | 6 | ||||
-rw-r--r-- | options.js | 6 | ||||
-rw-r--r-- | 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,10 +13,14 @@ <input type="radio" name="timefmt" id="t24" /><label for="t24"> 24-hour</label> </div> <div style="margin-top: 1em;"> - <p style="margin: 0em"><label for="fg">Foreground colour: <span style="color: #409;">(blank for default)</span></label></p> + <p style="margin: 0em"><label for="fg">Time colour: <span style="color: #409;">(blank for default)</span></label></p> <input type="text" name="fg" id="fg" placeholder="#ddd" /> </div> <div style="margin-top: 1em;"> + <p style="margin: 0em"><label for="fg_date">Date colour: <span style="color: #409;">(blank for default)</span></label></p> + <input type="text" name="fg_date" id="fg_date" placeholder="#777" /> + </div> + <div style="margin-top: 1em;"> <p style="margin: 0em;"><label for="bg">Background colour: <span style="color: #409;">(blank for default)</span></label></p> <input type="text" name="bg" id="bg" placeholder="#222" /> </div> @@ -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; @@ -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; |