From 465d9b9d6dd9aa4b3ffff010e2d839e2b8b2f9af Mon Sep 17 00:00:00 2001 From: Dale Davies Date: Mon, 15 Apr 2024 16:14:00 +0100 Subject: [PATCH] Update changelog, bump version and rebuild bundles for v1.4.0 release --- CHANGELOG.md | 20 +++++++++++++++++++ jumpapp/.jump-version | 2 +- ...n.js => index.fc7bac2b7fbb7dcc270e.min.js} | 2 +- jumpapp/templates/partials/jsbundle.mustache | 2 +- package.json | 2 +- 5 files changed, 24 insertions(+), 4 deletions(-) rename jumpapp/assets/js/{index.684ab59a1da833869f8b.min.js => index.fc7bac2b7fbb7dcc270e.min.js} (99%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 221be7c..2c6d0a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.4.0] - 2024-04-15 +### Added +- Support for auto-discovery of sites from docker. +- Language/translation support and several translations. +- Integration of Dasboard Icons support (https://github.com/walkxcode/dashboard-icons). +- Detailed debug option and much improved error handling. +- Discussion #81: Add meta tags for mobile compatibility. +- Discussion #78: Add option for custom greeting message. +- Universal caching for all site icon types, removes previous favicon cache mechanism. + +### Fixed +- Issue #82: Ampersand in url in sites.json breaks icon. +- Issue #110: Fix styling of site name when using alt layout. +- Make sites list scrollable if large number of sites. +- Fix broken forward caching of Unspash images, images were not rotating. +- Fix double logging of PHP error by nginx in docker container. +- Fix potential XSS issue from unsplash data. +- Fix broken site image in search results. +- Remove unnecessary console.log() in Weather.js. + ## [1.3.2] - 2023-03-17 ### Fixed - Issue #59: Show content on weather API error. diff --git a/jumpapp/.jump-version b/jumpapp/.jump-version index f55e598..9118301 100644 --- a/jumpapp/.jump-version +++ b/jumpapp/.jump-version @@ -1 +1 @@ -v1.3.2 (1713015994) \ No newline at end of file +v1.4.0 (1713193815) \ No newline at end of file diff --git a/jumpapp/assets/js/index.684ab59a1da833869f8b.min.js b/jumpapp/assets/js/index.fc7bac2b7fbb7dcc270e.min.js similarity index 99% rename from jumpapp/assets/js/index.684ab59a1da833869f8b.min.js rename to jumpapp/assets/js/index.fc7bac2b7fbb7dcc270e.min.js index 4823c4a..c09c7d3 100644 --- a/jumpapp/assets/js/index.684ab59a1da833869f8b.min.js +++ b/jumpapp/assets/js/index.fc7bac2b7fbb7dcc270e.min.js @@ -1 +1 @@ -(()=>{"use strict";var e={228:e=>{var t=Object.prototype.hasOwnProperty,s="~";function n(){}function i(e,t,s){this.fn=e,this.context=t,this.once=s||!1}function r(e,t,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new i(n,r||e,o),h=s?s+t:t;return e._events[h]?e._events[h].fn?e._events[h]=[e._events[h],c]:e._events[h].push(c):(e._events[h]=c,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function c(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(s=!1)),c.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(s?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},c.prototype.listeners=function(e){var t=s?s+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,r=n.length,o=new Array(r);i{class e{constructor(e,t=!1,s=!1){this.set_utc_shift(),this.contentintervalid=null,this.eventemitter=e,this.ampm=t,this.forcelocaltime=s}set_utc_shift(e=0){this.utcshift=e,this.shiftedtimestamp=(new Date).getTime()+this.utcshift,this.shifteddate=new Date(this.shiftedtimestamp)}get_formatted_time(){let e=this.shifteddate.getUTCHours(),t=String(this.shifteddate.getUTCMinutes()).padStart(2,"0");if(this.forcelocaltime&&(e=(new Date).getHours(),t=String((new Date).getMinutes()).padStart(2,"0")),!this.ampm)return String(e).padStart(2,"0")+":"+t;const s=e<=12?"AM":"PM";return e=(e+11)%12+1,e+":"+t+""+s+""}get_hour(){return this.forcelocaltime?(new Date).getHours():this.shifteddate.getUTCHours()}update_time(){this.set_utc_shift(this.utcshift),this.eventemitter.emit("clock-updated",{formatted_time:this.get_formatted_time(),hour:this.get_hour(),utcshift:this.utcshift})}run(e){this.contentintervalid&&clearInterval(this.contentintervalid),this.update_time(),this.contentintervalid=setInterval((()=>{this.update_time()}),e)}}const t=s(228);function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===d(e)}const i=1/0;function r(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-i?"-0":t}(e)}function o(e){return"string"==typeof e}function c(e){return"number"==typeof e}function h(e){return!0===e||!1===e||function(e){return a(e)&&null!==e}(e)&&"[object Boolean]"==d(e)}function a(e){return"object"==typeof e}function l(e){return null!=e}function u(e){return!e.trim().length}function d(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const g=e=>`Missing ${e} property in key`,f=e=>`Property 'weight' in key '${e}' must be a positive integer`,m=Object.prototype.hasOwnProperty;class p{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let s=v(e);t+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,t+=s.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function v(e){let t=null,s=null,i=null,r=1,c=null;if(o(e)||n(e))i=e,t=y(e),s=w(e);else{if(!m.call(e,"name"))throw new Error(g("name"));const n=e.name;if(i=n,m.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(f(n));t=y(n),s=w(n),c=e.getFn}return{path:t,id:s,weight:r,src:i,getFn:c}}function y(e){return n(e)?e:e.split(".")}function w(e){return n(e)?e.join("."):e}var M={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx{if(l(e))if(t[u]){const d=e[t[u]];if(!l(d))return;if(u===t.length-1&&(o(d)||c(d)||h(d)))s.push(r(d));else if(n(d)){i=!0;for(let e=0,s=d.length;e{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,o(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();o(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,s=this.size();t{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(l(r))if(n(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:s,value:i}=t.pop();if(l(i))if(o(i)&&!u(i)){let t={v:i,i:s,n:this.norm.get(i)};e.push(t)}else n(i)&&i.forEach(((e,s)=>{t.push({nestedArrIndex:s,value:e})}))}s.$[i]=e}else if(o(r)&&!u(r)){let e={v:r,n:this.norm.get(r)};s.$[i]=e}})),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function L(e,t,{getFn:s=M.getFn,fieldNormWeight:n=M.fieldNormWeight}={}){const i=new x({getFn:s,fieldNormWeight:n});return i.setKeys(e.map(v)),i.setSources(t),i.create(),i}function b(e,{errors:t=0,currentLocation:s=0,expectedLocation:n=0,distance:i=M.distance,ignoreLocation:r=M.ignoreLocation}={}){const o=t/e.length;if(r)return o;const c=Math.abs(n-s);return i?o+c/i:c?1:o}const k=32;function S(e,t,s,{location:n=M.location,distance:i=M.distance,threshold:r=M.threshold,findAllMatches:o=M.findAllMatches,minMatchCharLength:c=M.minMatchCharLength,includeMatches:h=M.includeMatches,ignoreLocation:a=M.ignoreLocation}={}){if(t.length>k)throw new Error(`Pattern length exceeds max of ${k}.`);const l=t.length,u=e.length,d=Math.max(0,Math.min(n,u));let g=r,f=d;const m=c>1||h,p=m?Array(u):[];let v;for(;(v=e.indexOf(t,f))>-1;){let e=b(t,{currentLocation:v,expectedLocation:d,distance:i,ignoreLocation:a});if(g=Math.min(e,g),f=v+l,m){let e=0;for(;e=h;r-=1){let o=r-1,c=s[e.charAt(o)];if(m&&(p[o]=+!!c),M[r]=(M[r+1]<<1|1)&c,n&&(M[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),M[r]&x&&(w=b(t,{errors:n,currentLocation:o,expectedLocation:d,distance:i,ignoreLocation:a}),w<=g)){if(g=w,f=o,f<=d)break;h=Math.max(1,2*d-f)}}if(b(t,{errors:n+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:a})>g)break;y=M}const L={isMatch:f>=0,score:Math.max(.001,w)};if(m){const e=function(e=[],t=M.minMatchCharLength){let s=[],n=-1,i=-1,r=0;for(let o=e.length;r=t&&s.push([n,i]),n=-1)}return e[r-1]&&r-n>=t&&s.push([n,r-1]),s}(p,c);e.length?h&&(L.indices=e):L.isMatch=!1}return L}function C(e){let t={};for(let s=0,n=e.length;s{this.chunks.push({pattern:e,alphabet:C(e),startIndex:t})},l=this.pattern.length;if(l>k){let e=0;const t=l%k,s=l-t;for(;e{const{isMatch:f,score:m,indices:p}=S(e,t,d,{location:n+g,distance:i,threshold:r,findAllMatches:o,minMatchCharLength:c,includeMatches:s,ignoreLocation:h});f&&(u=!0),l+=m,f&&p&&(a=[...a,...p])}));let d={isMatch:u,score:u?l/this.chunks.length:1};return u&&s&&(d.indices=a),d}}class A{constructor(e){this.pattern=e}static isMultiMatch(e){return I(e,this.multiRegex)}static isSingleMatch(e){return I(e,this.singleRegex)}search(){}}function I(e,t){const s=e.match(t);return s?s[1]:null}class N extends A{constructor(e,{location:t=M.location,threshold:s=M.threshold,distance:n=M.distance,includeMatches:i=M.includeMatches,findAllMatches:r=M.findAllMatches,minMatchCharLength:o=M.minMatchCharLength,isCaseSensitive:c=M.isCaseSensitive,ignoreLocation:h=M.ignoreLocation}={}){super(e),this._bitapSearch=new E(e,{location:t,threshold:s,distance:n,includeMatches:i,findAllMatches:r,minMatchCharLength:o,isCaseSensitive:c,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class q extends A{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,s=0;const n=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,s))>-1;)s=t+i,n.push([t,s-1]);const r=!!n.length;return{isMatch:r,score:r?0:1,indices:n}}}const O=[class extends A{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},q,class extends A{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends A{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends A{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends A{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends A{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},N],P=O.length,$=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const R=new Set([N.type,q.type]);class J{constructor(e,{isCaseSensitive:t=M.isCaseSensitive,includeMatches:s=M.includeMatches,minMatchCharLength:n=M.minMatchCharLength,ignoreLocation:i=M.ignoreLocation,findAllMatches:r=M.findAllMatches,location:o=M.location,threshold:c=M.threshold,distance:h=M.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:s,minMatchCharLength:n,findAllMatches:r,ignoreLocation:i,location:o,threshold:c,distance:h},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let s=e.trim().split($).filter((e=>e&&!!e.trim())),n=[];for(let e=0,i=s.length;e!(!e[j]&&!e[T]),D=e=>({[j]:Object.keys(e).map((t=>({[t]:e[t]})))});function K(e,t,{auto:s=!0}={}){const i=e=>{let r=Object.keys(e);const c=(e=>!!e[W])(e);if(!c&&r.length>1&&!z(e))return i(D(e));if((e=>!n(e)&&a(e)&&!z(e))(e)){const n=c?e[W]:r[0],i=c?e[H]:e[n];if(!o(i))throw new Error((e=>`Invalid value for key ${e}`)(n));const h={keyId:w(n),pattern:i};return s&&(h.searcher=F(i,t)),h}let h={children:[],operator:r[0]};return r.forEach((t=>{const s=e[t];n(s)&&s.forEach((e=>{h.children.push(i(e))}))})),h};return z(e)||(e=D(e)),i(e)}function V(e,t){const s=e.matches;t.matches=[],l(s)&&s.forEach((e=>{if(!l(e.indices)||!e.indices.length)return;const{indices:s,value:n}=e;let i={indices:s,value:n};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function B(e,t){t.score=e.score}class Q{constructor(e,t={},s){this.options={...M,...t},this.options.useExtendedSearch,this._keyStore=new p(this.options.keys),this.setCollection(e,s)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof x))throw new Error("Incorrect 'index' type");this._myIndex=t||L(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){l(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let s=0,n=this._docs.length;s{let s=1;e.matches.forEach((({key:e,norm:n,score:i})=>{const r=e?e.weight:null;s*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*(t?1:n))})),e.score=s}))}(a,{ignoreFieldNorm:h}),i&&a.sort(r),c(t)&&t>-1&&(a=a.slice(0,t)),function(e,t,{includeMatches:s=M.includeMatches,includeScore:n=M.includeScore}={}){const i=[];return s&&i.push(V),n&&i.push(B),e.map((e=>{const{idx:s}=e,n={item:t[s],refIndex:s};return i.length&&i.forEach((t=>{t(e,n)})),n}))}(a,this._docs,{includeMatches:s,includeScore:n})}_searchStringList(e){const t=F(e,this.options),{records:s}=this._myIndex,n=[];return s.forEach((({v:e,i:s,n:i})=>{if(!l(e))return;const{isMatch:r,score:o,indices:c}=t.searchIn(e);r&&n.push({item:e,idx:s,matches:[{score:o,value:e,norm:i,indices:c}]})})),n}_searchLogical(e){const t=K(e,this.options),s=(e,t,n)=>{if(!e.children){const{keyId:s,searcher:i}=e,r=this._findMatches({key:this._keyStore.get(s),value:this._myIndex.getValueForItemAtKeyId(t,s),searcher:i});return r&&r.length?[{idx:n,item:t,matches:r}]:[]}const i=[];for(let r=0,o=e.children.length;r{if(l(e)){let o=s(t,e,n);o.length&&(i[n]||(i[n]={idx:n,item:e,matches:[]},r.push(i[n])),o.forEach((({matches:e})=>{i[n].matches.push(...e)})))}})),r}_searchObjectList(e){const t=F(e,this.options),{keys:s,records:n}=this._myIndex,i=[];return n.forEach((({$:e,i:n})=>{if(!l(e))return;let r=[];s.forEach(((s,n)=>{r.push(...this._findMatches({key:s,value:e[n],searcher:t}))})),r.length&&i.push({idx:n,item:e,matches:r})})),i}_findMatches({key:e,value:t,searcher:s}){if(!l(t))return[];let i=[];if(n(t))t.forEach((({v:t,i:n,n:r})=>{if(!l(t))return;const{isMatch:o,score:c,indices:h}=s.searchIn(t);o&&i.push({score:c,key:e,value:t,idx:n,norm:r,indices:h})}));else{const{v:n,n:r}=t,{isMatch:o,score:c,indices:h}=s.searchIn(n);o&&i.push({score:c,key:e,value:n,norm:r,indices:h})}return i}}Q.version="6.6.2",Q.createIndex=L,Q.parseIndex=function(e,{getFn:t=M.getFn,fieldNormWeight:s=M.fieldNormWeight}={}){const{keys:n,records:i}=e,r=new x({getFn:t,fieldNormWeight:s});return r.setKeys(n),r.setIndexRecords(i),r},Q.config=M,Q.parseQuery=K,function(...e){U.push(...e)}(J);class G{constructor(e,t){this.hour=e,this.greetings={0:t.greetings.goodmorning,12:t.greetings.goodafternoon,16:t.greetings.goodevening,19:t.greetings.goodnight}}get_greeting(){let e=Object.keys(this.greetings).reverse();for(let t of e)if(this.hour>=t)return this.greetings[t]}}class X{constructor(e,t,s,n,i){this.containerelm=s,this.eventemitter=n,this.inputelm=t,this.suggestionslistelm=s.querySelector(".suggestion-list"),this.searchproviderlist=null,this.searchengines=e,this.strings=i}build_searchprovider_list_elm(e){const t=document.createElement("ul");return t.classList.add("searchproviders"),t.setAttribute("tabindex",-1),this.searchengines.forEach((s=>{const n=document.createElement("li");n.setAttribute("tabindex",-1),n.innerHTML=''+this.strings.search.searchon[s.name]+"",t.appendChild(n)})),t.addEventListener("keyup",(e=>{switch(e.code){case"ArrowUp":if(document.activeElement==e.target.parentNode.parentNode.firstChild.firstChild){this.inputelm.focus();break}document.activeElement.parentNode.previousSibling.firstChild.focus();break;case"ArrowDown":if(document.activeElement==e.target.parentNode.parentNode.lastChild.firstChild){const t=document.querySelector(".suggestionholder .suggestions");t?t.firstChild.firstChild.focus():e.target.parentNode.parentNode.firstChild.firstChild.focus();break}document.activeElement.parentNode.nextSibling.firstChild.focus()}})),t}build_suggestion_list_elm(e){const t=document.createElement("ul");return t.classList.add("suggestions"),t.setAttribute("tabindex",-1),e.forEach((e=>{const s=document.createElement("li");s.setAttribute("tabindex",-1),s.innerHTML=' '+e.name+"",t.appendChild(s)})),t.addEventListener("keyup",(e=>{switch(e.code){case"ArrowUp":if(document.activeElement==e.target.parentNode.parentNode.firstChild.firstChild){this.searchproviderlist.lastChild.firstChild.focus();break}document.activeElement.parentNode.previousSibling.firstChild.focus();break;case"ArrowDown":if(document.activeElement==e.target.parentNode.parentNode.lastChild.firstChild){this.searchproviderlist.firstChild.firstChild.focus();break}document.activeElement.parentNode.nextSibling.firstChild.focus()}})),t}replace(e){const t=this.build_suggestion_list_elm(e),s=document.createElement("span");if(s.classList.add("suggestionholder"),""!==this.inputelm.value){const e=document.createElement("span");e.classList.add("suggestiontitle"),e.innerHTML=this.strings.search.search,s.appendChild(e),this.searchproviderlist=this.build_searchprovider_list_elm(this.inputelm.value),s.appendChild(this.searchproviderlist)}if(t.childNodes.length>0){const e=document.createElement("span");e.classList.add("suggestiontitle"),e.innerHTML=this.strings.search.sites,s.appendChild(e),s.appendChild(t)}if(s.childNodes.length>0)this.containerelm.classList.add("suggestions"),this.suggestionslistelm.replaceChildren(s);else{this.containerelm.classList.remove("suggestions");let e=this.containerelm.querySelector(".suggestionholder");e&&e.remove()}}}class Y{constructor(e){this.eventemitter=e}fetch_owm_data(e){let t=JUMP.wwwurl+"/api/weather/"+JUMP.token+"/";e.length&&(t+=e[0]+"/"+e[1]+"/"),fetch(t).then((e=>{if(401===e.status)return console.error("JUMP ERROR: The OWM API key is invalid, check config.php"),void this.eventemitter.emit("weather-error");e.json().then((e=>{if(e.error)return console.error("JUMP ERROR: There was an issue with the OWM API... "+e.error),void this.eventemitter.emit("weather-error");var t="night";e.dt>e.sys.sunrise&&e.dte.json())).then((t=>{if(t.error)return void console.error("JUMP ERROR: There was an issue with the Unsplash API... "+t.error);e.style.backgroundImage='url("'+t.imagedatauri+'")';let s=document.querySelector(".unsplash a");s.textContent=t.attribution,s.href=t.link}))}JUMP.checkstatus&&fetch(JUMP.wwwurl+"/api/status/"+JUMP.token+"/").then((e=>e.json())).then((e=>{for(const[t,s]of Object.entries(e)){const e=document.querySelector("#"+t);if(e&&(e.classList.add(s),"online"!==s)){const t=e.querySelector("a");t.title="("+this.strings.status.status+": "+this.strings.status[s]+") "+t.title}}})),this.add_event_listeners(),JUMP.owmapikey?(this.weather.fetch_owm_data(this.latlong),setInterval((()=>{this.weather.fetch_owm_data(this.latlong)}),this.weatherfrequency)):this.eventemitter.emit("show-content")}add_event_listeners(){if(this.eventemitter.on("weather-loaded",(e=>{this.timezoneshift=e.timezoneshift,this.weatherelm.href="https://openweathermap.org/city/"+e.locationcode,this.weathericonelm.classList.add(e.iconclass),this.clientlocationelm.innerHTML=e.locationname,this.tempelm.innerHTML=e.temp,this.weatherdescelm.innerHTML=e.description,this.clientlocationelm.classList.add("enable"),this.eventemitter.emit("show-content")})),this.eventemitter.on("weather-error",(e=>{this.eventemitter.emit("show-content")})),this.eventemitter.on("clock-updated",(e=>{if(null!=this.timeelm&&(this.timeelm.innerHTML=e.formatted_time),null!=this.greetingelm){let t=new G(e.hour,this.strings);this.greetingelm.innerHTML=t.get_greeting()}})),this.eventemitter.on("show-content",(()=>{this.set_clock(),this.show_content()})),this.clientlocationelm.addEventListener("click",(e=>{navigator.geolocation.getCurrentPosition((e=>{this.latlong=[e.coords.latitude,e.coords.longitude],this.storage.setItem("lastrequestedlocation",JSON.stringify(this.latlong)),this.weather.fetch_owm_data(this.latlong)}),(e=>{console.error(e.message)}),{enableHighAccuracy:!0})})),this.showtagsbuttonelm&&this.showtagsbuttonelm.addEventListener("click",(e=>{this.tagselectorelm.classList.add("enable"),e.preventDefault()})),this.tagsselectorclosebuttonelm&&this.tagsselectorclosebuttonelm.addEventListener("click",(e=>{this.tagselectorelm.classList.remove("enable")})),this.showsearchbuttonelm){const e=document.querySelector(".search-form input");this.searchsuggestions=new X(JSON.parse(JUMP.searchengines),e,this.showsearchbuttonelm,this.eventemitter,this.strings),this.showsearchbuttonelm.addEventListener("click",(t=>{t.target.classList.contains("open")||(this.showsearchbuttonelm.classList.add("open"),e.focus())})),document.addEventListener("keyup",(t=>{t.ctrlKey&&t.shiftKey&&"Slash"==t.code&&(this.showsearchbuttonelm.classList.contains("open")?this.search_close():(this.showsearchbuttonelm.classList.add("open"),e.focus()))})),this.searchclosebuttonelm.addEventListener("click",(e=>{e.stopPropagation(),this.search_close()})),e.addEventListener("keyup",(t=>{let s=document.querySelector(".suggestion-list .searchproviders");if("ArrowDown"===t.code)return void(s&&s.childNodes.length&&s.firstChild.firstChild.focus());let n=[],i=this.fuse.search(e.value);i.length=8,i.length>0&&i.forEach((e=>{n.push(e.item)})),this.searchsuggestions.replace(n)})),document.querySelector(".search-form").addEventListener("submit",(t=>{t.preventDefault(),""!=e.value&&document.querySelector(".searchproviders li a").click()}))}}search_close(){let e=this.showsearchbuttonelm.querySelector(".suggestionholder");e&&e.remove(),this.showsearchbuttonelm.classList.remove("suggestions"),document.querySelector(".search").classList.remove("open"),document.querySelector(".search-form input").value=""}show_content(){document.querySelectorAll(".hidden").forEach((function(e){e.classList.remove("hidden")}))}set_clock(){this.clock.set_utc_shift(this.timezoneshift),this.clock.run(this.clockfrequency)}}).init()})()})(); \ No newline at end of file +(()=>{"use strict";var e={228:e=>{var t=Object.prototype.hasOwnProperty,s="~";function n(){}function i(e,t,s){this.fn=e,this.context=t,this.once=s||!1}function r(e,t,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var c=new i(n,r||e,o),h=s?s+t:t;return e._events[h]?e._events[h].fn?e._events[h]=[e._events[h],c]:e._events[h].push(c):(e._events[h]=c,e._eventsCount++),e}function o(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function c(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(s=!1)),c.prototype.eventNames=function(){var e,n,i=[];if(0===this._eventsCount)return i;for(n in e=this._events)t.call(e,n)&&i.push(s?n.slice(1):n);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(e)):i},c.prototype.listeners=function(e){var t=s?s+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,r=n.length,o=new Array(r);i{class e{constructor(e,t=!1,s=!1){this.set_utc_shift(),this.contentintervalid=null,this.eventemitter=e,this.ampm=t,this.forcelocaltime=s}set_utc_shift(e=0){this.utcshift=e,this.shiftedtimestamp=(new Date).getTime()+this.utcshift,this.shifteddate=new Date(this.shiftedtimestamp)}get_formatted_time(){let e=this.shifteddate.getUTCHours(),t=String(this.shifteddate.getUTCMinutes()).padStart(2,"0");if(this.forcelocaltime&&(e=(new Date).getHours(),t=String((new Date).getMinutes()).padStart(2,"0")),!this.ampm)return String(e).padStart(2,"0")+":"+t;const s=e<=12?"AM":"PM";return e=(e+11)%12+1,e+":"+t+""+s+""}get_hour(){return this.forcelocaltime?(new Date).getHours():this.shifteddate.getUTCHours()}update_time(){this.set_utc_shift(this.utcshift),this.eventemitter.emit("clock-updated",{formatted_time:this.get_formatted_time(),hour:this.get_hour(),utcshift:this.utcshift})}run(e){this.contentintervalid&&clearInterval(this.contentintervalid),this.update_time(),this.contentintervalid=setInterval((()=>{this.update_time()}),e)}}const t=s(228);function n(e){return Array.isArray?Array.isArray(e):"[object Array]"===d(e)}const i=1/0;function r(e){return null==e?"":function(e){if("string"==typeof e)return e;let t=e+"";return"0"==t&&1/e==-i?"-0":t}(e)}function o(e){return"string"==typeof e}function c(e){return"number"==typeof e}function h(e){return!0===e||!1===e||function(e){return a(e)&&null!==e}(e)&&"[object Boolean]"==d(e)}function a(e){return"object"==typeof e}function l(e){return null!=e}function u(e){return!e.trim().length}function d(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const g=e=>`Missing ${e} property in key`,f=e=>`Property 'weight' in key '${e}' must be a positive integer`,m=Object.prototype.hasOwnProperty;class p{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach((e=>{let s=v(e);t+=s.weight,this._keys.push(s),this._keyMap[s.id]=s,t+=s.weight})),this._keys.forEach((e=>{e.weight/=t}))}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function v(e){let t=null,s=null,i=null,r=1,c=null;if(o(e)||n(e))i=e,t=y(e),s=w(e);else{if(!m.call(e,"name"))throw new Error(g("name"));const n=e.name;if(i=n,m.call(e,"weight")&&(r=e.weight,r<=0))throw new Error(f(n));t=y(n),s=w(n),c=e.getFn}return{path:t,id:s,weight:r,src:i,getFn:c}}function y(e){return n(e)?e:e.split(".")}function w(e){return n(e)?e.join("."):e}var M={isCaseSensitive:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx{if(l(e))if(t[u]){const d=e[t[u]];if(!l(d))return;if(u===t.length-1&&(o(d)||c(d)||h(d)))s.push(r(d));else if(n(d)){i=!0;for(let e=0,s=d.length;e{this._keysMap[e.id]=t}))}create(){!this.isCreated&&this.docs.length&&(this.isCreated=!0,o(this.docs[0])?this.docs.forEach(((e,t)=>{this._addString(e,t)})):this.docs.forEach(((e,t)=>{this._addObject(e,t)})),this.norm.clear())}add(e){const t=this.size();o(e)?this._addString(e,t):this._addObject(e,t)}removeAt(e){this.records.splice(e,1);for(let t=e,s=this.size();t{let r=t.getFn?t.getFn(e):this.getFn(e,t.path);if(l(r))if(n(r)){let e=[];const t=[{nestedArrIndex:-1,value:r}];for(;t.length;){const{nestedArrIndex:s,value:i}=t.pop();if(l(i))if(o(i)&&!u(i)){let t={v:i,i:s,n:this.norm.get(i)};e.push(t)}else n(i)&&i.forEach(((e,s)=>{t.push({nestedArrIndex:s,value:e})}))}s.$[i]=e}else if(o(r)&&!u(r)){let e={v:r,n:this.norm.get(r)};s.$[i]=e}})),this.records.push(s)}toJSON(){return{keys:this.keys,records:this.records}}}function L(e,t,{getFn:s=M.getFn,fieldNormWeight:n=M.fieldNormWeight}={}){const i=new x({getFn:s,fieldNormWeight:n});return i.setKeys(e.map(v)),i.setSources(t),i.create(),i}function b(e,{errors:t=0,currentLocation:s=0,expectedLocation:n=0,distance:i=M.distance,ignoreLocation:r=M.ignoreLocation}={}){const o=t/e.length;if(r)return o;const c=Math.abs(n-s);return i?o+c/i:c?1:o}const k=32;function S(e,t,s,{location:n=M.location,distance:i=M.distance,threshold:r=M.threshold,findAllMatches:o=M.findAllMatches,minMatchCharLength:c=M.minMatchCharLength,includeMatches:h=M.includeMatches,ignoreLocation:a=M.ignoreLocation}={}){if(t.length>k)throw new Error(`Pattern length exceeds max of ${k}.`);const l=t.length,u=e.length,d=Math.max(0,Math.min(n,u));let g=r,f=d;const m=c>1||h,p=m?Array(u):[];let v;for(;(v=e.indexOf(t,f))>-1;){let e=b(t,{currentLocation:v,expectedLocation:d,distance:i,ignoreLocation:a});if(g=Math.min(e,g),f=v+l,m){let e=0;for(;e=h;r-=1){let o=r-1,c=s[e.charAt(o)];if(m&&(p[o]=+!!c),M[r]=(M[r+1]<<1|1)&c,n&&(M[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),M[r]&x&&(w=b(t,{errors:n,currentLocation:o,expectedLocation:d,distance:i,ignoreLocation:a}),w<=g)){if(g=w,f=o,f<=d)break;h=Math.max(1,2*d-f)}}if(b(t,{errors:n+1,currentLocation:d,expectedLocation:d,distance:i,ignoreLocation:a})>g)break;y=M}const L={isMatch:f>=0,score:Math.max(.001,w)};if(m){const e=function(e=[],t=M.minMatchCharLength){let s=[],n=-1,i=-1,r=0;for(let o=e.length;r=t&&s.push([n,i]),n=-1)}return e[r-1]&&r-n>=t&&s.push([n,r-1]),s}(p,c);e.length?h&&(L.indices=e):L.isMatch=!1}return L}function C(e){let t={};for(let s=0,n=e.length;s{this.chunks.push({pattern:e,alphabet:C(e),startIndex:t})},l=this.pattern.length;if(l>k){let e=0;const t=l%k,s=l-t;for(;e{const{isMatch:f,score:m,indices:p}=S(e,t,d,{location:n+g,distance:i,threshold:r,findAllMatches:o,minMatchCharLength:c,includeMatches:s,ignoreLocation:h});f&&(u=!0),l+=m,f&&p&&(a=[...a,...p])}));let d={isMatch:u,score:u?l/this.chunks.length:1};return u&&s&&(d.indices=a),d}}class A{constructor(e){this.pattern=e}static isMultiMatch(e){return I(e,this.multiRegex)}static isSingleMatch(e){return I(e,this.singleRegex)}search(){}}function I(e,t){const s=e.match(t);return s?s[1]:null}class N extends A{constructor(e,{location:t=M.location,threshold:s=M.threshold,distance:n=M.distance,includeMatches:i=M.includeMatches,findAllMatches:r=M.findAllMatches,minMatchCharLength:o=M.minMatchCharLength,isCaseSensitive:c=M.isCaseSensitive,ignoreLocation:h=M.ignoreLocation}={}){super(e),this._bitapSearch=new E(e,{location:t,threshold:s,distance:n,includeMatches:i,findAllMatches:r,minMatchCharLength:o,isCaseSensitive:c,ignoreLocation:h})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(e){return this._bitapSearch.searchIn(e)}}class q extends A{constructor(e){super(e)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(e){let t,s=0;const n=[],i=this.pattern.length;for(;(t=e.indexOf(this.pattern,s))>-1;)s=t+i,n.push([t,s-1]);const r=!!n.length;return{isMatch:r,score:r?0:1,indices:n}}}const O=[class extends A{constructor(e){super(e)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(e){const t=e===this.pattern;return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},q,class extends A{constructor(e){super(e)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(e){const t=e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,this.pattern.length-1]}}},class extends A{constructor(e){super(e)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(e){const t=!e.startsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends A{constructor(e){super(e)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(e){const t=!e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},class extends A{constructor(e){super(e)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(e){const t=e.endsWith(this.pattern);return{isMatch:t,score:t?0:1,indices:[e.length-this.pattern.length,e.length-1]}}},class extends A{constructor(e){super(e)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(e){const t=-1===e.indexOf(this.pattern);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}},N],P=O.length,$=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/;const R=new Set([N.type,q.type]);class J{constructor(e,{isCaseSensitive:t=M.isCaseSensitive,includeMatches:s=M.includeMatches,minMatchCharLength:n=M.minMatchCharLength,ignoreLocation:i=M.ignoreLocation,findAllMatches:r=M.findAllMatches,location:o=M.location,threshold:c=M.threshold,distance:h=M.distance}={}){this.query=null,this.options={isCaseSensitive:t,includeMatches:s,minMatchCharLength:n,findAllMatches:r,ignoreLocation:i,location:o,threshold:c,distance:h},this.pattern=t?e:e.toLowerCase(),this.query=function(e,t={}){return e.split("|").map((e=>{let s=e.trim().split($).filter((e=>e&&!!e.trim())),n=[];for(let e=0,i=s.length;e!(!e[j]&&!e[T]),D=e=>({[j]:Object.keys(e).map((t=>({[t]:e[t]})))});function K(e,t,{auto:s=!0}={}){const i=e=>{let r=Object.keys(e);const c=(e=>!!e[W])(e);if(!c&&r.length>1&&!z(e))return i(D(e));if((e=>!n(e)&&a(e)&&!z(e))(e)){const n=c?e[W]:r[0],i=c?e[H]:e[n];if(!o(i))throw new Error((e=>`Invalid value for key ${e}`)(n));const h={keyId:w(n),pattern:i};return s&&(h.searcher=F(i,t)),h}let h={children:[],operator:r[0]};return r.forEach((t=>{const s=e[t];n(s)&&s.forEach((e=>{h.children.push(i(e))}))})),h};return z(e)||(e=D(e)),i(e)}function V(e,t){const s=e.matches;t.matches=[],l(s)&&s.forEach((e=>{if(!l(e.indices)||!e.indices.length)return;const{indices:s,value:n}=e;let i={indices:s,value:n};e.key&&(i.key=e.key.src),e.idx>-1&&(i.refIndex=e.idx),t.matches.push(i)}))}function B(e,t){t.score=e.score}class Q{constructor(e,t={},s){this.options={...M,...t},this.options.useExtendedSearch,this._keyStore=new p(this.options.keys),this.setCollection(e,s)}setCollection(e,t){if(this._docs=e,t&&!(t instanceof x))throw new Error("Incorrect 'index' type");this._myIndex=t||L(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(e){l(e)&&(this._docs.push(e),this._myIndex.add(e))}remove(e=(()=>!1)){const t=[];for(let s=0,n=this._docs.length;s{let s=1;e.matches.forEach((({key:e,norm:n,score:i})=>{const r=e?e.weight:null;s*=Math.pow(0===i&&r?Number.EPSILON:i,(r||1)*(t?1:n))})),e.score=s}))}(a,{ignoreFieldNorm:h}),i&&a.sort(r),c(t)&&t>-1&&(a=a.slice(0,t)),function(e,t,{includeMatches:s=M.includeMatches,includeScore:n=M.includeScore}={}){const i=[];return s&&i.push(V),n&&i.push(B),e.map((e=>{const{idx:s}=e,n={item:t[s],refIndex:s};return i.length&&i.forEach((t=>{t(e,n)})),n}))}(a,this._docs,{includeMatches:s,includeScore:n})}_searchStringList(e){const t=F(e,this.options),{records:s}=this._myIndex,n=[];return s.forEach((({v:e,i:s,n:i})=>{if(!l(e))return;const{isMatch:r,score:o,indices:c}=t.searchIn(e);r&&n.push({item:e,idx:s,matches:[{score:o,value:e,norm:i,indices:c}]})})),n}_searchLogical(e){const t=K(e,this.options),s=(e,t,n)=>{if(!e.children){const{keyId:s,searcher:i}=e,r=this._findMatches({key:this._keyStore.get(s),value:this._myIndex.getValueForItemAtKeyId(t,s),searcher:i});return r&&r.length?[{idx:n,item:t,matches:r}]:[]}const i=[];for(let r=0,o=e.children.length;r{if(l(e)){let o=s(t,e,n);o.length&&(i[n]||(i[n]={idx:n,item:e,matches:[]},r.push(i[n])),o.forEach((({matches:e})=>{i[n].matches.push(...e)})))}})),r}_searchObjectList(e){const t=F(e,this.options),{keys:s,records:n}=this._myIndex,i=[];return n.forEach((({$:e,i:n})=>{if(!l(e))return;let r=[];s.forEach(((s,n)=>{r.push(...this._findMatches({key:s,value:e[n],searcher:t}))})),r.length&&i.push({idx:n,item:e,matches:r})})),i}_findMatches({key:e,value:t,searcher:s}){if(!l(t))return[];let i=[];if(n(t))t.forEach((({v:t,i:n,n:r})=>{if(!l(t))return;const{isMatch:o,score:c,indices:h}=s.searchIn(t);o&&i.push({score:c,key:e,value:t,idx:n,norm:r,indices:h})}));else{const{v:n,n:r}=t,{isMatch:o,score:c,indices:h}=s.searchIn(n);o&&i.push({score:c,key:e,value:n,norm:r,indices:h})}return i}}Q.version="6.6.2",Q.createIndex=L,Q.parseIndex=function(e,{getFn:t=M.getFn,fieldNormWeight:s=M.fieldNormWeight}={}){const{keys:n,records:i}=e,r=new x({getFn:t,fieldNormWeight:s});return r.setKeys(n),r.setIndexRecords(i),r},Q.config=M,Q.parseQuery=K,function(...e){U.push(...e)}(J);class G{constructor(e,t){this.hour=e,this.greetings={0:t.greetings.goodmorning,12:t.greetings.goodafternoon,16:t.greetings.goodevening,19:t.greetings.goodnight}}get_greeting(){let e=Object.keys(this.greetings).reverse();for(let t of e)if(this.hour>=t)return this.greetings[t]}}class X{constructor(e,t,s,n,i){this.containerelm=s,this.eventemitter=n,this.inputelm=t,this.suggestionslistelm=s.querySelector(".suggestion-list"),this.searchproviderlist=null,this.searchengines=e,this.strings=i}build_searchprovider_list_elm(e){const t=document.createElement("ul");return t.classList.add("searchproviders"),t.setAttribute("tabindex",-1),this.searchengines.forEach((s=>{const n=document.createElement("li");n.setAttribute("tabindex",-1),n.innerHTML=''+this.strings.search.searchon[s.name]+"",t.appendChild(n)})),t.addEventListener("keyup",(e=>{switch(e.code){case"ArrowUp":if(document.activeElement==e.target.parentNode.parentNode.firstChild.firstChild){this.inputelm.focus();break}document.activeElement.parentNode.previousSibling.firstChild.focus();break;case"ArrowDown":if(document.activeElement==e.target.parentNode.parentNode.lastChild.firstChild){const t=document.querySelector(".suggestionholder .suggestions");t?t.firstChild.firstChild.focus():e.target.parentNode.parentNode.firstChild.firstChild.focus();break}document.activeElement.parentNode.nextSibling.firstChild.focus()}})),t}build_suggestion_list_elm(e){const t=document.createElement("ul");return t.classList.add("suggestions"),t.setAttribute("tabindex",-1),e.forEach((e=>{const s=document.createElement("li");s.setAttribute("tabindex",-1),s.innerHTML=' '+e.name+"",t.appendChild(s)})),t.addEventListener("keyup",(e=>{switch(e.code){case"ArrowUp":if(document.activeElement==e.target.parentNode.parentNode.firstChild.firstChild){this.searchproviderlist.lastChild.firstChild.focus();break}document.activeElement.parentNode.previousSibling.firstChild.focus();break;case"ArrowDown":if(document.activeElement==e.target.parentNode.parentNode.lastChild.firstChild){this.searchproviderlist.firstChild.firstChild.focus();break}document.activeElement.parentNode.nextSibling.firstChild.focus()}})),t}replace(e){const t=this.build_suggestion_list_elm(e),s=document.createElement("span");if(s.classList.add("suggestionholder"),""!==this.inputelm.value){const e=document.createElement("span");e.classList.add("suggestiontitle"),e.innerHTML=this.strings.search.search,s.appendChild(e),this.searchproviderlist=this.build_searchprovider_list_elm(this.inputelm.value),s.appendChild(this.searchproviderlist)}if(t.childNodes.length>0){const e=document.createElement("span");e.classList.add("suggestiontitle"),e.innerHTML=this.strings.search.sites,s.appendChild(e),s.appendChild(t)}if(s.childNodes.length>0)this.containerelm.classList.add("suggestions"),this.suggestionslistelm.replaceChildren(s);else{this.containerelm.classList.remove("suggestions");let e=this.containerelm.querySelector(".suggestionholder");e&&e.remove()}}}class Y{constructor(e){this.eventemitter=e}fetch_owm_data(e){let t=JUMP.wwwurl+"/api/weather/"+JUMP.token+"/";e.length&&(t+=e[0]+"/"+e[1]+"/"),fetch(t).then((e=>{if(401===e.status)return console.error("JUMP ERROR: The OWM API key is invalid, check config.php"),void this.eventemitter.emit("weather-error");e.json().then((e=>{if(e.error)return console.error("JUMP ERROR: There was an issue with the OWM API... "+e.error),void this.eventemitter.emit("weather-error");var t="night";e.dt>e.sys.sunrise&&e.dte.json())).then((t=>{if(t.error)return void console.error("JUMP ERROR: There was an issue with the Unsplash API... "+t.error);e.style.backgroundImage='url("'+t.imagedatauri+'")';let s=document.querySelector(".unsplash a");s.textContent=t.attribution,s.href=t.link}))}JUMP.checkstatus&&fetch(JUMP.wwwurl+"/api/status/"+JUMP.token+"/").then((e=>e.json())).then((e=>{for(const[t,s]of Object.entries(e)){const e=document.querySelector("#"+t);if(e&&(e.classList.add(s),"online"!==s)){const t=e.querySelector("a");t.title="("+this.strings.status.status+": "+this.strings.status[s]+") "+t.title}}})),this.add_event_listeners(),JUMP.owmapikey?(this.weather.fetch_owm_data(this.latlong),setInterval((()=>{this.weather.fetch_owm_data(this.latlong)}),this.weatherfrequency)):this.eventemitter.emit("show-content")}add_event_listeners(){if(this.eventemitter.on("weather-loaded",(e=>{this.timezoneshift=e.timezoneshift,this.weatherelm.href="https://openweathermap.org/city/"+e.locationcode,this.weathericonelm.classList.add(e.iconclass),this.clientlocationelm.innerHTML=e.locationname,this.tempelm.innerHTML=e.temp,this.weatherdescelm.innerHTML=e.description,this.clientlocationelm.classList.add("enable"),this.eventemitter.emit("show-content")})),this.eventemitter.on("weather-error",(e=>{this.eventemitter.emit("show-content")})),this.eventemitter.on("clock-updated",(e=>{if(null!=this.timeelm&&(this.timeelm.innerHTML=e.formatted_time),null!=this.greetingelm){let t=new G(e.hour,this.strings);this.greetingelm.innerHTML=t.get_greeting()}})),this.eventemitter.on("show-content",(()=>{this.set_clock(),this.show_content()})),this.clientlocationelm.addEventListener("click",(e=>{navigator.geolocation.getCurrentPosition((e=>{this.latlong=[e.coords.latitude,e.coords.longitude],this.storage.setItem("lastrequestedlocation",JSON.stringify(this.latlong)),this.weather.fetch_owm_data(this.latlong)}),(e=>{console.error(e.message)}),{enableHighAccuracy:!0})})),this.showtagsbuttonelm&&this.showtagsbuttonelm.addEventListener("click",(e=>{this.tagselectorelm.classList.add("enable"),e.preventDefault()})),this.tagsselectorclosebuttonelm&&this.tagsselectorclosebuttonelm.addEventListener("click",(e=>{this.tagselectorelm.classList.remove("enable")})),this.showsearchbuttonelm){const e=document.querySelector(".search-form input");this.searchsuggestions=new X(JSON.parse(JUMP.searchengines),e,this.showsearchbuttonelm,this.eventemitter,this.strings),this.showsearchbuttonelm.addEventListener("click",(t=>{t.target.classList.contains("open")||(this.showsearchbuttonelm.classList.add("open"),e.focus())})),document.addEventListener("keyup",(t=>{t.ctrlKey&&t.shiftKey&&"Slash"==t.code&&(this.showsearchbuttonelm.classList.contains("open")?this.search_close():(this.showsearchbuttonelm.classList.add("open"),e.focus()))})),this.searchclosebuttonelm.addEventListener("click",(e=>{e.stopPropagation(),this.search_close()})),e.addEventListener("keyup",(t=>{let s=document.querySelector(".suggestion-list .searchproviders");if("ArrowDown"===t.code)return void(s&&s.childNodes.length&&s.firstChild.firstChild.focus());let n=[],i=this.fuse.search(e.value);i.length=8,i.length>0&&i.forEach((e=>{n.push(e.item)})),this.searchsuggestions.replace(n)})),document.querySelector(".search-form").addEventListener("submit",(t=>{t.preventDefault(),""!=e.value&&document.querySelector(".searchproviders li a").click()}))}}search_close(){let e=this.showsearchbuttonelm.querySelector(".suggestionholder");e&&e.remove(),this.showsearchbuttonelm.classList.remove("suggestions"),document.querySelector(".search").classList.remove("open"),document.querySelector(".search-form input").value=""}show_content(){document.querySelectorAll(".hidden").forEach((function(e){e.classList.remove("hidden")}))}set_clock(){this.clock.set_utc_shift(this.timezoneshift),this.clock.run(this.clockfrequency)}}).init()})()})(); \ No newline at end of file diff --git a/jumpapp/templates/partials/jsbundle.mustache b/jumpapp/templates/partials/jsbundle.mustache index 76f7977..08d8f6d 100644 --- a/jumpapp/templates/partials/jsbundle.mustache +++ b/jumpapp/templates/partials/jsbundle.mustache @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/package.json b/package.json index b43492c..9120ac1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jump", - "version": "1.3.2", + "version": "1.4.0", "description": "Jump is yet another self-hosted startpage for your server designed to be simple, stylish, fast and secure.", "scripts": { "dev": "webpack --mode=development --devtool=inline-source-map --watch",