From a7d65766bedfaf92559e763d276d8ac46d3ba75d Mon Sep 17 00:00:00 2001 From: zombieFox Date: Sat, 18 Apr 2020 11:56:35 +0100 Subject: [PATCH] [refactor] change separators inputs to work like font inputs --- package-lock.json | 2 +- package.json | 2 +- src/js/clock.js | 5 +++-- src/js/date.js | 5 +++-- src/js/state.js | 8 ++++---- src/js/version.js | 2 +- src/manifest.json | 2 +- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/package-lock.json b/package-lock.json index a0717c15..b4278e2c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.10.0", + "version": "5.11.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 827ebb04..ff7c02b4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nightTab", - "version": "5.10.0", + "version": "5.11.0", "description": "A neutral new tab page accented with a chosen colour. Customise the layout, style, background and bookmarks in nightTab.", "main": "index.js", "scripts": { diff --git a/src/js/clock.js b/src/js/clock.js index e937439d..021c4ee5 100644 --- a/src/js/clock.js +++ b/src/js/clock.js @@ -111,10 +111,11 @@ var clock = (function() { clock.appendChild(elementMeridiem); }; if (state.get.current().header.clock.separator.show) { + var separatorCharacter; if (state.get.current().header.clock.separator.text.trim().replace(/\s\s+/g, " ") != "") { - var separatorCharacter = state.get.current().header.clock.separator.text.trim().replace(/\s\s+/g, " "); + separatorCharacter = state.get.current().header.clock.separator.text.trim().replace(/\s\s+/g, " "); } else { - var separatorCharacter = state.get.default().header.clock.separator.text; + separatorCharacter = ":"; }; var parts = clock.querySelectorAll("span"); if (parts.length > 1) { diff --git a/src/js/date.js b/src/js/date.js index eabf5289..2332fa4d 100644 --- a/src/js/date.js +++ b/src/js/date.js @@ -128,10 +128,11 @@ var date = (function() { date.appendChild(elementYear); }; if (state.get.current().header.date.separator.show) { + var separatorCharacter; if (state.get.current().header.date.separator.text.trim().replace(/\s\s+/g, " ") != "") { - var separatorCharacter = state.get.current().header.date.separator.text.trim().replace(/\s\s+/g, " "); + separatorCharacter = state.get.current().header.date.separator.text.trim().replace(/\s\s+/g, " "); } else { - var separatorCharacter = state.get.default().header.date.separator.text; + separatorCharacter = "/"; }; var parts = date.querySelectorAll("span"); if (parts.length > 1) { diff --git a/src/js/state.js b/src/js/state.js index 12836a9e..9da98005 100644 --- a/src/js/state.js +++ b/src/js/state.js @@ -34,7 +34,7 @@ var state = (function() { }, separator: { show: true, - text: ":" + text: "" }, meridiem: { show: true @@ -75,7 +75,7 @@ var state = (function() { }, separator: { show: true, - text: "/" + text: "" }, format: "datemonth", size: 1, @@ -366,13 +366,13 @@ var state = (function() { }, clock: { separator: { - text: ":" + text: "" }, size: 1 }, date: { separator: { - text: "/" + text: "" }, size: 1 }, diff --git a/src/js/version.js b/src/js/version.js index bce7efb3..3077019c 100644 --- a/src/js/version.js +++ b/src/js/version.js @@ -1,6 +1,6 @@ var version = (function() { - var current = "5.10.0"; + var current = "5.11.0"; var name = "Zonked Tarsier"; diff --git a/src/manifest.json b/src/manifest.json index 1ccebd16..df94ecbe 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "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.", - "version": "5.10.0", + "version": "5.11.0", "manifest_version": 2, "chrome_url_overrides": { "newtab": "index.html"