[refactor] change separators inputs to work like font inputs

This commit is contained in:
zombieFox 2020-04-18 11:56:35 +01:00
parent 26325d331b
commit a7d65766be
7 changed files with 14 additions and 12 deletions

2
package-lock.json generated
View File

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

View File

@ -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": {

View File

@ -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) {

View File

@ -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) {

View File

@ -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
},

View File

@ -1,6 +1,6 @@
var version = (function() {
var current = "5.10.0";
var current = "5.11.0";
var name = "Zonked Tarsier";

View File

@ -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"