summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--manifest.json2
-rw-r--r--options.html6
-rw-r--r--options.js6
-rw-r--r--tempo.js4
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>
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;