diff --git a/fonts/lato-v14-latin-900.woff b/fonts/lato-v14-latin-900.woff new file mode 100644 index 0000000..6f251d9 Binary files /dev/null and b/fonts/lato-v14-latin-900.woff differ diff --git a/fonts/lato-v14-latin-900.woff2 b/fonts/lato-v14-latin-900.woff2 new file mode 100644 index 0000000..a5abe36 Binary files /dev/null and b/fonts/lato-v14-latin-900.woff2 differ diff --git a/fonts/lato-v14-latin-regular.woff b/fonts/lato-v14-latin-regular.woff new file mode 100644 index 0000000..97ab144 Binary files /dev/null and b/fonts/lato-v14-latin-regular.woff differ diff --git a/fonts/lato-v14-latin-regular.woff2 b/fonts/lato-v14-latin-regular.woff2 new file mode 100644 index 0000000..b14c76c Binary files /dev/null and b/fonts/lato-v14-latin-regular.woff2 differ diff --git a/index.html b/index.html index 5670360..2bc4a7a 100644 --- a/index.html +++ b/index.html @@ -2,8 +2,11 @@ + + @@ -481,7 +554,6 @@ - ~
@@ -565,7 +637,7 @@ constructor(options) { this._el = $.el('#clock'); this._delimiter = options.delimiter; - this._clockTwelveHour = options.clockTwelveHour; + this._twentyFourHourClock = options.twentyFourHourClock; this._setTime = this._setTime.bind(this); this._el.addEventListener('click', options.showForm); this._start(); @@ -576,7 +648,7 @@ let hours = $.pad(date.getHours()); let amPm = ''; - if (this._clockTwelveHour) { + if (!this._twentyFourHourClock) { hours = date.getHours(); if (hours > 12) hours -= 12; else if (hours === 0) hours = 12; @@ -974,25 +1046,28 @@ const splitPath = trimmed.split(this._pathDelimiter); this._commands.some(({ category, key, name, search, url }) => { - res.isKey = query === key; - res.isSearch = !res.isKey && splitSearch[0] === key; - res.isPath = !res.isKey && splitPath[0] === key; - - if (res.isKey || res.isSearch || res.isPath) { + if (query === key) { res.key = key; + res.isKey = true; + res.redirect = url; + return true; + } - if (res.isSearch && search) { - res.split = this._searchDelimiter; - res.query = QueryParser._shiftAndTrim(splitSearch, res.split); - res.redirect = QueryParser._prepSearch(url, search, res.query); - } else if (res.isPath) { - res.split = this._pathDelimiter; - res.path = QueryParser._shiftAndTrim(splitPath, res.split); - res.redirect = QueryParser._prepPath(url, res.path); - } else { - res.redirect = url; - } + if (splitSearch[0] === key && search) { + res.key = key; + res.isSearch = true; + res.split = this._searchDelimiter; + res.query = QueryParser._shiftAndTrim(splitSearch, res.split); + res.redirect = QueryParser._prepSearch(url, search, res.query); + return true; + } + if (splitPath[0] === key) { + res.key = key; + res.isPath = true; + res.split = this._pathDelimiter; + res.path = QueryParser._shiftAndTrim(splitPath, res.split); + res.redirect = QueryParser._prepPath(url, res.path); return true; } @@ -1011,7 +1086,7 @@ return ( commands - .filter(c => new URL(c.url).hostname === domain) + .filter(c => new URL(c.url).hostname.includes(domain)) .map(c => c.color)[0] || null ); } @@ -1202,6 +1277,6 @@ new Clock({ delimiter: CONFIG.clockDelimiter, showForm: form.show, - clockTwelveHour: CONFIG.clockTwelveHour, + twentyFourHourClock: CONFIG.twentyFourHourClock, });