Ver código fonte

[add] settings menu entry

isundil 8 anos atrás
pai
commit
db374590ac

+ 2 - 0
cli/lang/en.js

@@ -46,6 +46,8 @@ lang["en"] = {
         "fileUploadCancel": "Cancel",
         "neterror": "Cannot connect to chat !",
 
+        "ctxMenuSettings": "Settings",
+
         "settingTitle": "Settings",
         "setting-menu-services": "Services",
         "settings-services-title": "Services",

+ 2 - 0
cli/lang/fr.js

@@ -46,6 +46,8 @@ lang["fr"] = {
         "fileUploadCancel": "Annuler",
         "neterror": "Impossible de se connecter au chat !",
 
+        "ctxMenuSettings": "Configuration",
+
         "settingTitle": "Configuration",
         "setting-menu-services": "Services",
         "settings-services-title": "Services",

+ 1 - 0
cli/resources.js

@@ -26,6 +26,7 @@ var R = {
             emoji: "emojiButton"
         },
         settings: {
+            menuButton: "ctxMenuSettings",
             wrapper: "settings",
             menu: {
                 list: "settingMenuItems"

+ 4 - 0
cli/ui.js

@@ -574,6 +574,10 @@ document.addEventListener('DOMContentLoaded', function() {
         document.getElementById(R.id.message.file.fileInput).value = "";
         return false;
     });
+    document.getElementById(R.id.settings.menuButton).addEventListener("click", function(e) {
+        e.preventDefault();
+        Settings.display().setClosable(true);
+    });
     document.getElementById(R.id.message.file.form).addEventListener("submit", function(e) {
         e.preventDefault();
         var fileInput = document.getElementById(R.id.message.file.fileInput),

+ 2 - 0
cli/uiSettings.js

@@ -69,3 +69,5 @@ var Settings = (function() {
     };
 })();
 
+
+

+ 18 - 18
srv/public/mimouchat.min.js

@@ -10,10 +10,10 @@ function ja(a,b,c){var d=0;b.forEach(function(a){d=Math.max(this.push(a,c),d)}.b
 D.prototype.push=function(a,b){for(var c,d=!1,e,f=0,g=this.a.length;f<g;f++)if(c=this.a[f],c.id===a.id){e=c.update(a,b);d=!0;break}d||(c=this.i(a,b),this.a.push(c),e=c.l);for(;this.a.length>this.w;)this.a.shift();if(this.b)for(a=0;a<this.a.length;a++)this.a[a].version<b-this.b&&this.a.splice(a--,1);return e||0};function la(a){return a.a[a.a.length-1]}function ma(a,b){for(var c=0,d=a.a.length;c<d;c++)if(a.a[c].id==b)return a.a[c];return null}function ka(a){a.a.sort(function(a,c){return a.l-c.l})}
 z.prototype=Object.create(v.prototype);z.prototype.constructor=z;A.prototype=Object.create(v.prototype);A.prototype.constructor=A;"undefined"!==typeof module&&(module.H={hb:v,gb:z,jb:A,mb:D});function ia(a){this.id=a;this.j={};this.oa=this.O=null;this.version=0}ia.prototype.update=function(a,b){void 0!==a.name&&(this.name=a.name);void 0!==a.deleted&&(this.Fa=a.deleted);void 0!==a.status&&(this.status=a.status);void 0!==a.presence&&(this.a="away"!==a.presence);void 0!==a.isPresent&&(this.a=a.isPresent);a.isBot&&(this.Va=a.isBot);this.version=Math.max(this.version,b)};"undefined"!==typeof module&&(module.H.eb=ia);function na(){this.a=[]}na.prototype.push=function(a){this.a.push(a)};function oa(a,b){for(var c=0,d=a.a.length;c<d;c++)if(b===pa(a.a[c]))return a.a[c];return null}function qa(a,b){for(var c=0,d=a.a.length;c<d;c++){var e=a.a[c],f;for(f in e.j)if(!0===b(e.j[f],f))return}}function ra(a){for(var b=E.context,c=0,d=b.a.length;c<d&&!0!==a(b.a[c]);c++);}function H(a,b){for(var c=0,d=a.a.length;c<d;c++)if(a.a[c].j[b])return a.a[c];return null}
 function sa(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].j[a];if(e)return e}return null}function ta(a){for(var b=E.context,c=[],d=0,e=b.a.length;d<e;d++){var f=b.a[d].j,g;for(g in f)a&&!a(f[g],b.a[d],g)||c.push(g)}return c}function I(a){for(var b=E.context,c=0,d=b.a.length;c<d;c++){var e=b.a[c].m[a];if(e)return e}return null}"undefined"!==typeof module&&(module.H.ib=na);var J={},K,ua=[];function va(){if(!c){for(var a=0,b=navigator.languages.length;a<b;a++)if(J.hasOwnProperty(navigator.languages[a])){var c=navigator.languages[a];break}c||(c="en")}K=J[c];console.log("Loading language pack: "+c);if(K.c)for(var d in K.c)if(c=document.getElementById(d))c.textContent=K.c[d];ua.forEach(function(a){a()})};J.fr={ab:"Utilisateur inconnu",$a:"Channel inconnu",Ka:"Nouveau message",message:"Message",Ja:"Reseau",La:"(visible seulement par vous)",F:"Favoris",j:"Discutions",Na:"Discutions priv\u00e9es",Oa:"Partage sa position GPS",ok:"Ok",Ga:"Annuler",V:function(a){"string"!==typeof a&&(a=parseFloat(a));var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"hier, "+a.toLocaleTimeString():
-a.toLocaleString()},ja:function(a,b){return a+"/"+b},c:{fileUploadCancel:"Annuler",neterror:"Impossible de se connecter au chat !",settingTitle:"Configuration","setting-menu-services":"Services","settings-services-title":"Services","setting-menu-display":"Affichage","settings-display-title":"Affichage","setting-menu-privacy":"Vie priv\u00e9e","settings-privacy-title":"Vie priv\u00e9e",settingCommit:"Appliquer","settings-serviceAddButton":"Ajouter un service","settings-serviceListEmpty":"Vous n'avez pas encore ajout\u00e9 de service. Ajouter un service pour continuer.",
+a.toLocaleString()},ja:function(a,b){return a+"/"+b},c:{fileUploadCancel:"Annuler",neterror:"Impossible de se connecter au chat !",ctxMenuSettings:"Configuration",settingTitle:"Configuration","setting-menu-services":"Services","settings-services-title":"Services","setting-menu-display":"Affichage","settings-display-title":"Affichage","setting-menu-privacy":"Vie priv\u00e9e","settings-privacy-title":"Vie priv\u00e9e",settingCommit:"Appliquer","settings-serviceAddButton":"Ajouter un service","settings-serviceListEmpty":"Vous n'avez pas encore ajout\u00e9 de service. Ajouter un service pour continuer.",
 "settings-serviceAddConfirm":"Suivant"}};J.fr.D=function(a){return"(edit&eacute; "+J.fr.V(a)+")"};J.en={ab:"Unknown member",$a:"Unknown channel",Ka:"New message",message:"Message",Ja:"Network",La:"(only visible to you)",F:"Starred",j:"Channels",Na:"Direct messages",Oa:"Share your GPS location",ok:"Ok",Ga:"Cancel",V:function(a){"string"!==typeof a&&(a=parseFloat(a));var b=new Date,c=new Date;a=new Date(a);b.setHours(0,0,0,0);c.setTime(b.getTime());c.setDate(c.getDate()-1);return a.getTime()>b.getTime()?a.toLocaleTimeString():a.getTime()>c.getTime()?"yesterday, "+a.toLocaleTimeString():a.toLocaleString()},
-ja:function(a,b){return a+"/"+b},c:{fileUploadCancel:"Cancel",neterror:"Cannot connect to chat !",settingTitle:"Settings","setting-menu-services":"Services","settings-services-title":"Services","setting-menu-display":"Display","settings-display-title":"Display","setting-menu-privacy":"Privacy","settings-privacy-title":"Privacy",settingCommit:"Apply","settings-serviceAddButton":"Add a service","settings-serviceListEmpty":"You don't have any service yet. Please add a service to continue.","settings-serviceAddConfirm":"Next"}};
-J.en.D=function(a){return"(edited "+J.en.V(a)+")"};var wa=function(){function a(a){this.text="";this.g=a}function b(b,c,d){this.T=c;this.f=null;this.h=[];this.a=d||"";this.ea="<"===this.a;this.pa="*"===this.a;this.da="_"===this.a;this.fa="~"===this.a||"-"===this.a;this.i=">"===this.a||"&gt;"===this.a;this.W=":"===this.a;this.ra="`"===this.a;this.Ca="```"===this.a;this.sa="\n"===this.a;this.ca=void 0!==d&&-1!==n.A.indexOf(d);this.g=b;this.ga=null;this.b=this.sa||this.ca?c+d.length-1:!1;this.ca&&(this.f=new a(this),this.h.push(this.f),this.f.text=d)}
+ja:function(a,b){return a+"/"+b},c:{fileUploadCancel:"Cancel",neterror:"Cannot connect to chat !",ctxMenuSettings:"Settings",settingTitle:"Settings","setting-menu-services":"Services","settings-services-title":"Services","setting-menu-display":"Display","settings-display-title":"Display","setting-menu-privacy":"Privacy","settings-privacy-title":"Privacy",settingCommit:"Apply","settings-serviceAddButton":"Add a service","settings-serviceListEmpty":"You don't have any service yet. Please add a service to continue.",
+"settings-serviceAddConfirm":"Next"}};J.en.D=function(a){return"(edited "+J.en.V(a)+")"};var wa=function(){function a(a){this.text="";this.g=a}function b(b,c,d){this.T=c;this.f=null;this.h=[];this.a=d||"";this.ea="<"===this.a;this.pa="*"===this.a;this.da="_"===this.a;this.fa="~"===this.a||"-"===this.a;this.i=">"===this.a||"&gt;"===this.a;this.W=":"===this.a;this.ra="`"===this.a;this.Ca="```"===this.a;this.sa="\n"===this.a;this.ca=void 0!==d&&-1!==n.A.indexOf(d);this.g=b;this.ga=null;this.b=this.sa||this.ca?c+d.length-1:!1;this.ca&&(this.f=new a(this),this.h.push(this.f),this.f.text=d)}
 function c(a){return"A"<=a&&"Z">=a||"a"<=a&&"z">=a||"0"<=a&&"9">=a||-1!=="\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u00e1\u00e9\u00ed\u00f3\u00fa\u00fd\u00c1\u00c9\u00cd\u00d3\u00da\u00dd\u00e2\u00ea\u00ee\u00f4\u00fb\u00c2\u00ca\u00ce\u00d4\u00db\u00e3\u00f1\u00f5\u00c3\u00d1\u00d5\u00e4\u00eb\u00ef\u00f6\u00fc\u00ff\u00c4\u00cb\u00cf\u00d6\u00dc\u0178\u00e7\u00c7\u00df\u00d8\u00f8\u00c5\u00e5\u00c6\u00e6\u0153".indexOf(a)}function d(a){a=a||h;for(var c=0,e=a.h.length;c<e;c++){var k=
 a.h[c];if(k instanceof b)if(k.b){if(k=d(k))return k}else return k}return null}function e(a,c){a.g instanceof b&&(a.g.h.splice(a.g.h.indexOf(a)+(c?1:0)),a.g.f=a.g.h[a.g.h.length-1],e(a.g,!0))}function f(a){return a}function g(a){return{link:a,text:a,Ia:!1}}var m,h,n={A:[],U:f,ba:f,$:g};b.prototype.ua=function(){return this.pa&&!!this.b||this.g instanceof b&&this.g.ua()};b.prototype.xa=function(){return this.da&&!!this.b||this.g instanceof b&&this.g.xa()};b.prototype.ya=function(){return this.fa&&!!this.b||
 this.g instanceof b&&this.g.ya()};b.prototype.ma=function(){return this.W&&!!this.b||this.g instanceof b&&this.g.ma()};b.prototype.wa=function(){return this.ca&&!!this.b||this.g instanceof b&&this.g.wa()};b.prototype.va=function(){return this.ra&&!!this.b||this.g instanceof b&&this.g.va()};b.prototype.la=function(){return this.Ca&&!!this.b||this.g instanceof b&&this.g.la()};b.prototype.za=function(){for(var a=0,c=this.h.length;a<c;a++)if(this.h[a]instanceof b&&(!this.h[a].b||this.h[a].za()))return!0;
@@ -50,12 +50,12 @@ gb(a,a.o[e],a.o[e].actions[f]);break}}if(c.parentElement&&c.parentElement.classL
 function gb(a,b,c){function d(){var d={actions:[c],attachment_id:b.id,callback_id:b.callback_id,channel_id:e,is_ephemeral:a instanceof A,message_ts:a.id},g=new XMLHttpRequest;g.open("POST","api/attachmentAction?serviceId="+a.J);g.send(JSON.stringify(d))}var e=M.id;c.confirm?Ka(Ja(new xa(c.confirm.title,c.confirm.text),c.confirm.ok_text,c.confirm.dismiss_text),d).aa():d()}function R(){document.getElementById("msgInput").focus()}
 function Qa(){var a=document.location.hash.substr(1),b=sa(a);b&&b!==M?hb(b):(a=I(a))&&a.b&&hb(a.b)}function bb(){var a=document.getElementById("chatWindow").getBoundingClientRect().top;La.forEach(function(b){var c=b.Z,d=c.clientHeight;b=b.getBoundingClientRect();c.style.top=Math.max(0,Math.min(a-b.top,b.height-d-d/2))+"px";c.dataset.debugval=a-b.top;c.dataset.debugmax=b.height-d-d/2})}
 document.addEventListener("DOMContentLoaded",function(){va();ib();document.getElementById("chatWindow").addEventListener("click",fb);window.addEventListener("hashchange",function(){document.location.hash&&"#"===document.location.hash[0]&&Qa()});document.getElementById("currentRoomStar").addEventListener("click",function(a){a.preventDefault();M&&(M.F?(a=new XMLHttpRequest,a.open("POST","api/unstarChannel?room="+M.id,!0)):(a=new XMLHttpRequest,a.open("POST","api/starChannel?room="+M.id,!0)),a.send(null));
-return!1});document.getElementById("fileUploadCancel").addEventListener("click",function(a){a.preventDefault();document.getElementById("fileUploadError").classList.add("hidden");document.getElementById("fileUploadContainer").classList.add("hidden");document.getElementById("fileUploadInput").value="";return!1});document.getElementById("fileUploadForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("fileUploadInput");var b=a.value;b&&(b=b.substr(b.lastIndexOf("\\")+
-1),jb(b,a.files[0],function(a){var b=document.getElementById("fileUploadError");a?(b.textContent=a,b.classList.remove("hidden")):(b.classList.add("hidden"),document.getElementById("fileUploadInput").value="",document.getElementById("fileUploadContainer").classList.add("hidden"))}));return!1});document.getElementById("attachFile").addEventListener("click",function(a){a.preventDefault();M&&document.getElementById("fileUploadContainer").classList.remove("hidden");return!1});document.getElementById("msgForm").addEventListener("submit",
-function(a){a.preventDefault();a=document.getElementById("msgInput");M&&a.value&&kb(a.value)&&(a.value="",T&&(T=null,U()),V&&(V=null,U()),document.getElementById("slashList").textContent="");R();return!1});window.addEventListener("blur",function(){window.hasFocus=!1});window.addEventListener("focus",function(){window.hasFocus=!0;Ma=0;M&&Xa();R()});document.getElementById("chatWindow").addEventListener("scroll",bb);var a=0;document.getElementById("msgInput").addEventListener("input",function(){if(M){var b=
-Date.now();a+3E3<b&&(P.self.a||M instanceof t)&&(lb(),a=b);var b=[],c=this.value;if("/"===this.value[0]){var d=c.indexOf(" "),e=-1!==d,d=-1===d?c.length:d,c=c.substr(0,d);if(e){var f=mb.Ha(c);f&&b.push(f)}else b=mb.Ta(c);var f=P?P.i.data:{};for(m in f){var g=f[m];(!e&&g.name.substr(0,d)===c||e&&g.name===c)&&b.push(g)}}b.sort(function(a,b){return a.R.localeCompare(b.R)||a.name.localeCompare(b.name)});var m=document.getElementById("slashList");var d=document.createDocumentFragment();m.textContent="";
-e=0;for(c=b.length;e<c;e++){f=b[e];if(h!==f.R){var h=f.R;d.appendChild(nb(f.R))}d.appendChild(ob(f))}m.appendChild(d)}});window.hasFocus=!0;(function(){var a=document.getElementById("emojiButton");if("makeEmoji"in window){var c=window.makeEmoji("smile");c?a.innerHTML="<span class='emoji-small'>"+c.outerHTML+"</span>":a.style.backgroundImage='url("smile.svg")';(c=window.makeEmoji("paperclip"))?document.getElementById("attachFile").innerHTML="<span class='emoji-small'>"+c.outerHTML+"</span>":document.getElementById("attachFile").style.backgroundImage=
-'url("public/paperclip.svg")';a.addEventListener("click",function(){P&&db.aa(document.body,P,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");R()})})}else a.classList.add("hidden")})();pb()});var qb=function(){function a(a){c&&(document.getElementById("settings").classList.remove("display-"+c),document.getElementById("setting-menu-"+c).classList.remove("selected"),document.getElementById("settings-serviceAddSection").classList.add("hidden"));document.getElementById("settings").classList.add("display-"+a);document.getElementById("setting-menu-"+a).classList.add("selected");c=a}var b=!1,c=null,d={X:"services",display:"display",nb:"privacy"};document.getElementById("settingMenuItems").addEventListener("click",
+return!1});document.getElementById("fileUploadCancel").addEventListener("click",function(a){a.preventDefault();document.getElementById("fileUploadError").classList.add("hidden");document.getElementById("fileUploadContainer").classList.add("hidden");document.getElementById("fileUploadInput").value="";return!1});document.getElementById("ctxMenuSettings").addEventListener("click",function(a){a.preventDefault();jb.display()});document.getElementById("fileUploadForm").addEventListener("submit",function(a){a.preventDefault();
+a=document.getElementById("fileUploadInput");var b=a.value;b&&(b=b.substr(b.lastIndexOf("\\")+1),kb(b,a.files[0],function(a){var b=document.getElementById("fileUploadError");a?(b.textContent=a,b.classList.remove("hidden")):(b.classList.add("hidden"),document.getElementById("fileUploadInput").value="",document.getElementById("fileUploadContainer").classList.add("hidden"))}));return!1});document.getElementById("attachFile").addEventListener("click",function(a){a.preventDefault();M&&document.getElementById("fileUploadContainer").classList.remove("hidden");
+return!1});document.getElementById("msgForm").addEventListener("submit",function(a){a.preventDefault();a=document.getElementById("msgInput");M&&a.value&&lb(a.value)&&(a.value="",T&&(T=null,U()),V&&(V=null,U()),document.getElementById("slashList").textContent="");R();return!1});window.addEventListener("blur",function(){window.hasFocus=!1});window.addEventListener("focus",function(){window.hasFocus=!0;Ma=0;M&&Xa();R()});document.getElementById("chatWindow").addEventListener("scroll",bb);var a=0;document.getElementById("msgInput").addEventListener("input",
+function(){if(M){var b=Date.now();a+3E3<b&&(P.self.a||M instanceof t)&&(mb(),a=b);var b=[],c=this.value;if("/"===this.value[0]){var d=c.indexOf(" "),e=-1!==d,d=-1===d?c.length:d,c=c.substr(0,d);if(e){var f=nb.Ha(c);f&&b.push(f)}else b=nb.Ta(c);var f=P?P.i.data:{};for(m in f){var g=f[m];(!e&&g.name.substr(0,d)===c||e&&g.name===c)&&b.push(g)}}b.sort(function(a,b){return a.R.localeCompare(b.R)||a.name.localeCompare(b.name)});var m=document.getElementById("slashList");var d=document.createDocumentFragment();
+m.textContent="";e=0;for(c=b.length;e<c;e++){f=b[e];if(h!==f.R){var h=f.R;d.appendChild(ob(f.R))}d.appendChild(pb(f))}m.appendChild(d)}});window.hasFocus=!0;(function(){var a=document.getElementById("emojiButton");if("makeEmoji"in window){var c=window.makeEmoji("smile");c?a.innerHTML="<span class='emoji-small'>"+c.outerHTML+"</span>":a.style.backgroundImage='url("smile.svg")';(c=window.makeEmoji("paperclip"))?document.getElementById("attachFile").innerHTML="<span class='emoji-small'>"+c.outerHTML+
+"</span>":document.getElementById("attachFile").style.backgroundImage='url("public/paperclip.svg")';a.addEventListener("click",function(){P&&db.aa(document.body,P,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");R()})})}else a.classList.add("hidden")})();qb()});var jb=function(){function a(a){c&&(document.getElementById("settings").classList.remove("display-"+c),document.getElementById("setting-menu-"+c).classList.remove("selected"),document.getElementById("settings-serviceAddSection").classList.add("hidden"));document.getElementById("settings").classList.add("display-"+a);document.getElementById("setting-menu-"+a).classList.add("selected");c=a}var b=!1,c=null,d={X:"services",display:"display",nb:"privacy"};document.getElementById("settingMenuItems").addEventListener("click",
 function(b){for(var c=b.target;b.currentTarget!==c&&c;c=c.parentNode)if(c.dataset&&c.dataset.target)for(var e in d)if(d[e]===c.dataset.target){a(d[e]);return}});document.getElementById("settings-serviceAddButton").addEventListener("click",function(a){a.preventDefault();document.getElementById("settings-serviceAddSection").classList.remove("hidden");return!1});document.getElementById("settings-serviceAddConfirm").addEventListener("click",function(a){a.preventDefault();document.location.href=document.getElementById("settings-serviceAddServiceList").value;
 return!1});return{display:function(c){b||(document.getElementById("settings").classList.remove("hidden"),b=!0);a(c||d.X);return this},Za:function(){return this},Xa:d}}();function rb(a){if(void 0!==a.latitude&&void 0!==a.longitude&&-90<=a.latitude&&90>=a.latitude&&-180<=a.longitude&&180>=a.longitude){var b=0,c=function(a,b,c,d){return new Promise(function(e,f){var g=new Image;g.addEventListener("load",function(){d.M=g;e(d)});g.addEventListener("error",function(){console.warn("Error loading tile ",{zoom:a,x:b,y:c});f(g)});g.crossOrigin="anonymous";g.src="https://c.tile.openstreetmap.org/"+a+"/"+b+"/"+c+".png"})},d=document.createElement("canvas"),e=document.createElement("canvas");
 d.height=d.width=e.height=e.width=300;var f=d.getContext("2d"),g=e.getContext("2d"),m=function(a,b,c){a=a*Math.PI/180;b=b*Math.PI/180;c=c*Math.PI/180;return Math.abs(6371E3*Math.acos(Math.pow(Math.sin(a),2)+Math.pow(Math.cos(a),2)*Math.cos(c-b)))},h=function(a,d,e,h){g.fillStyle="#808080";g.fillRect(0,0,300,300);f.fillStyle="#808080";f.fillRect(0,0,300,300);var l=Math.pow(2,a),k=(e+180)/360*l,n=(1-Math.log(Math.tan(d*Math.PI/180)+1/Math.cos(d*Math.PI/180))/Math.PI)/2*l,F=Math.floor(k),ba=Math.floor(n),
@@ -72,8 +72,8 @@ r.src=b.image_url:r.classList.add("hidden");w.className="chatmsg-attachment-foot
 e.appendChild(r);if(b.fields&&b.fields.length){var x=document.createElement("ul");e.appendChild(x);x.className="chatmsg-attachment-fields";b.fields.forEach(function(b){var c=b.title||"",d=b.value||"";b=!!b["short"];var e=document.createElement("li"),f=document.createElement("div"),g=document.createElement("div");e.className="field";b||e.classList.add("field-long");f.className="field-title";f.textContent=c;g.className="field-text";g.innerHTML=a.u(d);e.appendChild(f);e.appendChild(g);e&&x.appendChild(e)})}if(b.actions&&
 b.actions.length)for(g=document.createElement("ul"),g.className="chatmsg-attachment-actions "+Fa,e.appendChild(g),m=0,k=b.actions.length;m<k;m++)(r=b.actions[m])&&(r=vb(c,m,r))&&g.appendChild(r);e.appendChild(w);d.appendChild(f);d.appendChild(e);return d}
 function vb(a,b,c){var d=document.createElement("li"),e=tb(c.style);d.textContent=c.text;e!==tb()&&(d.style.color=e);d.style.borderColor=e;d.dataset.attachmentIndex=a;d.dataset.actionIndex=b;d.className="chatmsg-attachment-actions-item "+Ea;return d}function Ua(a){var b=document.createElement("li"),c=document.createElement("span");c.textContent=a.name;b.appendChild(Oa());b.appendChild(c);return b}
-function nb(a){var b=document.createElement("lh");b.textContent=a;b.className="chat-command-header";return b}
-function ob(a){var b=document.createElement("li"),c=document.createElement("span"),d=document.createElement("span"),e=document.createElement("span");c.textContent=a.name;d.textContent=a.usage;e.textContent=a.a;b.appendChild(c);b.appendChild(d);b.appendChild(e);b.className="chat-command-item";c.className="chat-command-name";d.className="chat-command-usage";e.className="chat-command-desc";return b};var db=function(){function a(a,b){for(a=a.target;a!==h&&a&&"LI"!==a.nodeName;)a=a.parentElement;a&&"LI"===a.nodeName&&a.id&&"emojibar-"===a.id.substr(0,9)?b(a.id.substr(9)):b(null)}function b(){if(!c())return!1;G&&G(null);return!0}function c(){return h.parentElement?(h.parentElement.removeChild(n),h.parentElement.removeChild(h),!0):!1}function d(a){var b=0;a=void 0===a?r.value:a;if(m()){var c=0,d=window.searchEmojis(a),g=e(d,S.self.O.a),h;for(k in w)w[k].visible&&(w[k].visible=!1,l.removeChild(w[k].c));
+function ob(a){var b=document.createElement("lh");b.textContent=a;b.className="chat-command-header";return b}
+function pb(a){var b=document.createElement("li"),c=document.createElement("span"),d=document.createElement("span"),e=document.createElement("span");c.textContent=a.name;d.textContent=a.usage;e.textContent=a.a;b.appendChild(c);b.appendChild(d);b.appendChild(e);b.className="chat-command-item";c.className="chat-command-name";d.className="chat-command-usage";e.className="chat-command-desc";return b};var db=function(){function a(a,b){for(a=a.target;a!==h&&a&&"LI"!==a.nodeName;)a=a.parentElement;a&&"LI"===a.nodeName&&a.id&&"emojibar-"===a.id.substr(0,9)?b(a.id.substr(9)):b(null)}function b(){if(!c())return!1;G&&G(null);return!0}function c(){return h.parentElement?(h.parentElement.removeChild(n),h.parentElement.removeChild(h),!0):!1}function d(a){var b=0;a=void 0===a?r.value:a;if(m()){var c=0,d=window.searchEmojis(a),g=e(d,S.self.O.a),h;for(k in w)w[k].visible&&(w[k].visible=!1,l.removeChild(w[k].c));
 var k=0;for(h=g.length;k<h;k++){var B=g[k].name,n=w[B];if(!n){var n=w,F=B;var G=B;var B=window.makeEmoji(d[B]),y=document.createElement("span");y.appendChild(B);y.className="emoji-medium";G=f(G,y);n=n[F]=G}n.visible||(n.visible=!0,l.appendChild(n.c));c++}b+=c}k=b;var c=0;for(C in x)x[C].visible&&(x[C].visible=!1,q.removeChild(x[C].c));d=e(S.b.data,S.self.O.a);var C=0;for(b=d.length;C<b;C++)F=d[C].name,""!==a&&F.substr(0,a.length)!==a||"alias:"===S.b.data[F].substr(0,6)||(g=x[F],g||(g=x,n=h=F,F=S.b.data[F],
 G=document.createElement("span"),B=document.createElement("span"),G.className="emoji emoji-custom",G.style.backgroundImage='url("'+F+'")',B.appendChild(G),B.className="emoji-medium",n=f(n,B),g=g[h]=n),g.visible||(g.visible=!0,q.appendChild(g.c)),c++);return k+c}function e(a,b){var c=[],d;for(d in a){var e={name:d,Ma:0,count:0};if(a[d].names)for(var f=0,g=a[d].names.length;f<g;f++)e.count+=b[a[d].names[f]]||0;c.push(e)}return c=c.sort(function(a,b){var c=b.count-a.count;return c?c:a.Ma-b.Ma})}function f(a,
 b){var c=document.createElement("li");c.appendChild(b);c.className="emojibar-list-item";c.id="emojibar-"+a;return{visible:!1,c:c}}function g(a){var b=document.createElement("img"),c=document.createElement("div");b.src=a;c.appendChild(b);c.className="emojibar-header";return c}function m(){return"searchEmojis"in window}var h=document.createElement("div"),n=document.createElement("div"),k=document.createElement("div"),l=document.createElement("ul"),q=document.createElement("ul"),r=document.createElement("input"),
@@ -81,7 +81,7 @@ w={},x={},y=document.createElement("div"),C=document.createElement("span"),B=doc
 y.appendChild(C);y.appendChild(B);k.appendChild(g(window.emojiProviderHeader));k.appendChild(l);k.appendChild(g("emojicustom.png"));k.appendChild(q);h.appendChild(k);h.appendChild(y);h.appendChild(r);r.addEventListener("keyup",function(){d()});h.addEventListener("mousemove",function(b){a(b,function(a){var b=a?w[a]||x[a]:null;b?(C.innerHTML=b.c.outerHTML,B.textContent=":"+a+":"):(C.textContent="",B.textContent="")})});h.addEventListener("click",function(b){a(b,function(a){a&&c()&&G&&G(a)})});return{isSupported:m,
 aa:function(a,b,c){return m()?(S=b,G=c,a.appendChild(n),a.appendChild(h),r.value="",d(),r.focus(),!0):!1},search:d,close:b}}();var E,N=[];function wb(){fa.call(this)}wb.prototype=Object.create(fa.prototype);wb.prototype.constructor=wb;function pa(a){return a.a?a.a.id:null}function xb(){this.b=0;this.context=new na;this.a={}}
 xb.prototype.update=function(a){var b=Date.now();a.v&&(this.b=a.v);if(a["static"])for(e in a["static"]){var c=oa(this.context,e);c||(c=new wb,this.context.push(c));ha(c,a["static"][e],b)}qa(this.context,function(a){a.N===a.B&&(a=N.indexOf(a),-1!==a&&N.splice(a,1))});if(a.live){for(e in a.live)(c=this.a[e])?ja(c,a.live[e],b):c=this.a[e]=new Y(e,250,a.live[e],b);for(var d in a.live){var e=H(this.context,d);(c=e.j[d])?(this.a[d].a.length&&(c.N=Math.max(c.N,la(this.a[d]).l)),c.Y||(yb(e,c,a.live[d]),M&&
-a.live[M.id]&&Q())):E.b=0}}a["static"]&&Na();var f=!1;a.typing&&this.context.a.forEach(function(c){var d=f,e=a.typing,g=!1;if(c.s)for(var k in c.s)e[k]||(delete c.s[k],g=!0);if(e)for(k in e)if(c.j[k]){c.s[k]||(c.s[k]={});for(var l in e[k])c.s[k][l]||(g=!0),c.s[k][l]=b}f=d|g},this);(a["static"]||f)&&Sa();a.config&&(zb=new Ab(a.config),Bb()&&qb.Za(!1).display(qb.Xa.X));if(P&&M&&a["static"]&&a["static"][P.a.id]&&a["static"][P.a.id].channels&&a["static"][P.a.id].channels)for(d=a["static"][P.a.id].channels,
+a.live[M.id]&&Q())):E.b=0}}a["static"]&&Na();var f=!1;a.typing&&this.context.a.forEach(function(c){var d=f,e=a.typing,g=!1;if(c.s)for(var k in c.s)e[k]||(delete c.s[k],g=!0);if(e)for(k in e)if(c.j[k]){c.s[k]||(c.s[k]={});for(var l in e[k])c.s[k][l]||(g=!0),c.s[k][l]=b}f=d|g},this);(a["static"]||f)&&Sa();a.config&&(zb=new Ab(a.config),Bb()&&jb.Za(!1).display(jb.Xa.X));if(P&&M&&a["static"]&&a["static"][P.a.id]&&a["static"][P.a.id].channels&&a["static"][P.a.id].channels)for(d=a["static"][P.a.id].channels,
 e=0,c=d.length;e<c;e++)if(d[e].id===M.id){Q();break}};setInterval(function(){var a=!1,b=Date.now();ra(function(c){var d=!1,e;for(e in c.s){var f=!0,g;for(g in c.s[e])c.s[e][g]+3E3<b?(delete c.s[e][g],d=!0):f=!1;f&&(delete c.s[e],d=!0)}d&&(a=!0)});a&&Sa()},1E3);
 function yb(a,b,c){if(b!==M||!window.hasFocus){var d=new RegExp("<@"+a.self.id),e=!1,f=!1,g=!1;c.forEach(function(c){if(!(parseFloat(c.ts)<=b.B)){f=!0;var h;if(!(h=b instanceof t)&&(h=c.text)&&!(h=c.text.match(d)))a:{h=a.self.O.A;for(var m=0,k=h.length;m<k;m++)if(-1!==c.text.indexOf(h[m])){h=!0;break a}h=!1}h&&(-1===N.indexOf(b)&&(g=!0,N.push(b)),e=!0)}});if(f){O();if(c=document.getElementById("room_"+b.id))c.classList.add("unread"),e&&c.classList.add("unreadHi");g&&!window.hasFocus&&ab()}}}
 function Xa(){var a=M,b=N.indexOf(a);if(a.N>a.B){var c=E.a[a.id];if(c&&(c=c.a[c.a.length-1])){var d=new XMLHttpRequest;d.open("POST","api/markread?room="+a.id+"&id="+c.id+"&ts="+c.l,!0);d.send(null);a.B=c.l}}0<=b&&(N.splice(b,1),O());a=document.getElementById("room_"+a.id);a.classList.remove("unread");a.classList.remove("unreadHi")}E=new xb;var Ra=function(){function a(a,c){c.sort(function(){return Math.random()-.5});for(var d=0,e=20;e<n-40;e+=l)for(var f=0;f+l<=k;f+=l)g(a,c[d],e,f),d++,d===c.length&&(c.sort(b),d=0)}function b(a,b){return a.M?b.M?Math.random()-.5:-1:1}function c(a,b){for(var e=0,f=a.length;e<f;e++)if(void 0===a[e].M){d(a[e].src,function(d){a[e].M=d;c(a,b)});return}var g=[];a.forEach(function(a){a.M&&g.push(a.M)});b(g)}function d(a,b){var c=new XMLHttpRequest;c.responseType="blob";c.onreadystatechange=function(){if(4===
@@ -90,11 +90,11 @@ c.open("GET",a,!0);c.send(null)}function e(){var a=h.createLinearGradient(0,0,0,
 "#"+(1.1*a[0]<<16|1.1*a[1]<<8|1.1*a[2]).toString(16);h.beginPath();h.moveTo(c+l/2,d+q);h.lineTo(c-q+l,d+l/2);h.lineTo(c+l/2,d-q+l);h.lineTo(c+q,d+l/2);h.closePath();h.fill();h.putImageData(f(h.getImageData(c+q,d+q,r,r),b),c+q,d+q)}var m=document.createElement("canvas"),h=m.getContext("2d"),n=m.width=250,k=m.height=290,l=(n-40)/3,q=.1*l,r=Math.floor(l-2*q),w=.5*r,x={},y={},C={};return function(b,d,f){if(x[b])f(x[b]);else if(C[b])y[b]?y[b].push(f):y[b]=[f];else{var g=e(),h=[];C[b]=!0;y[b]?y[b].push(f):
 y[b]=[f];for(var k in d)d[k].Fa||d[k].Va||h.push({src:"api/avatar?user="+d[k].id});c(h,function(c){a(g,c);x[b]=m.toDataURL();y[b].forEach(function(a){a(x[b])})})}}}();var X=0,M=null,P=null,T=null,V=null;function ib(){var a=new XMLHttpRequest;a.timeout=6E4;a.onreadystatechange=function(){if(4===a.readyState){var b=document.createElement("script"),c=document.createElement("link");b.innerHTML=a.response;b.language="text/javascript";c.href="hljs-androidstudio.css";c.rel="stylesheet";document.head.appendChild(c);document.body.appendChild(b)}};a.open("GET","highlight.pack.js",!0);a.send(null)}
 function Cb(){var a=M,b=new XMLHttpRequest;b.open("GET","api/hist?room="+a.id,!0);b.onreadystatechange=function(){if(4===b.readyState&&b.response){var c=b.response;try{c=JSON.parse(c)}catch(e){}var d=E.a[a.id];d?d=!!ja(d,c,Date.now()):(E.a[a.id]=new Y(a,100,c,Date.now()),d=!0);d&&(yb(H(E.context,a.id),a,c),a===M&&Q())}};b.send(null)}
-function Db(a){var b=new XMLHttpRequest;b.timeout=6E4;b.onreadystatechange=function(){if(4===b.readyState)if(b.status){var c=null,d=2===Math.floor(b.status/100);if(d){X&&(X=0,Va(!0));c=b.response;try{c=JSON.parse(c)}catch(e){c=null}}else X?(X+=Math.floor((X||5)/2),X=Math.min(60,X)):(X=5,Va(!1));a(d,c)}else X&&(X=0,Va(!0)),Db(a)};b.open("GET","api?v="+E.b,!0);b.send(null)}function lb(){var a=new XMLHttpRequest;a.open("POST","api/typing?room="+M.id,!0);a.send(null)}
-function Eb(a,b){a?(b&&E.update(b),pb()):setTimeout(pb,1E3*X)}function pb(){Db(Eb)}function hb(a){M&&document.getElementById("room_"+M.id).classList.remove("selected");document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");M=a;P=H(E.context,a.id);Wa();Ra(P.a.id,P.m,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"});(!E.a[M.id]||100>E.a[M.id].a.length)&&Cb()}
-function jb(a,b,c){var d=M;new FileReader;var e=new FormData,f=new XMLHttpRequest;e.append("file",b);e.append("filename",a);f.onreadystatechange=function(){4===f.readyState&&(204===f.status?c(null):c(f.statusText))};f.open("POST","api/file?room="+d.id);f.send(e)}
+function Db(a){var b=new XMLHttpRequest;b.timeout=6E4;b.onreadystatechange=function(){if(4===b.readyState)if(b.status){var c=null,d=2===Math.floor(b.status/100);if(d){X&&(X=0,Va(!0));c=b.response;try{c=JSON.parse(c)}catch(e){c=null}}else X?(X+=Math.floor((X||5)/2),X=Math.min(60,X)):(X=5,Va(!1));a(d,c)}else X&&(X=0,Va(!0)),Db(a)};b.open("GET","api?v="+E.b,!0);b.send(null)}function mb(){var a=new XMLHttpRequest;a.open("POST","api/typing?room="+M.id,!0);a.send(null)}
+function Eb(a,b){a?(b&&E.update(b),qb()):setTimeout(qb,1E3*X)}function qb(){Db(Eb)}function hb(a){M&&document.getElementById("room_"+M.id).classList.remove("selected");document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");M=a;P=H(E.context,a.id);Wa();Ra(P.a.id,P.m,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"});(!E.a[M.id]||100>E.a[M.id].a.length)&&Cb()}
+function kb(a,b,c){var d=M;new FileReader;var e=new FormData,f=new XMLHttpRequest;e.append("file",b);e.append("filename",a);f.onreadystatechange=function(){4===f.readyState&&(204===f.status?c(null):c(f.statusText))};f.open("POST","api/file?room="+d.id);f.send(e)}
 function Fb(a,b,c){var d=new XMLHttpRequest;b="api/msg?room="+a.id+"&text="+encodeURIComponent(b);c&&(b+="&attachments="+encodeURIComponent(JSON.stringify([{fallback:c.text,author_name:I(c.J).name,text:c.text,footer:a.b?K.message:a.name,ts:c.l}])));d.open("POST",b,!0);d.send(null)}
-function kb(a){if(V){var b=new XMLHttpRequest;b.open("PUT","api/msg?room="+M.id+"&ts="+V.id+"&text="+encodeURIComponent(a),!0);b.send(null);return!0}if("/"===a[0]){var c=a.indexOf(" "),b=a.substr(0,-1===c?void 0:c);a=-1===c?"":a.substr(c);var c=P,d=mb.Ha(b);return d?(d.exec(c,M,a.trim()),!0):c&&(b=c.i.data[b])?(c=new XMLHttpRequest,c.open("POST","api/cmd?room="+M.id+"&cmd="+encodeURIComponent(b.name.substr(1))+"&args="+encodeURIComponent(a.trim()),!0),c.send(null),!0):!1}Fb(M,a,T);return!0}
+function lb(a){if(V){var b=new XMLHttpRequest;b.open("PUT","api/msg?room="+M.id+"&ts="+V.id+"&text="+encodeURIComponent(a),!0);b.send(null);return!0}if("/"===a[0]){var c=a.indexOf(" "),b=a.substr(0,-1===c?void 0:c);a=-1===c?"":a.substr(c);var c=P,d=nb.Ha(b);return d?(d.exec(c,M,a.trim()),!0):c&&(b=c.i.data[b])?(c=new XMLHttpRequest,c.open("POST","api/cmd?room="+M.id+"&cmd="+encodeURIComponent(b.name.substr(1))+"&args="+encodeURIComponent(a.trim()),!0),c.send(null),!0):!1}Fb(M,a,T);return!0}
 function eb(a){var b=new XMLHttpRequest;b.open("DELETE","api/msg?room="+M.id+"&ts="+a.id,!0);b.send(null)}function Ya(a,b,c){var d=new XMLHttpRequest;d.open("POST","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c),!0);d.send(null)};function Y(a,b,c,d){D.call(this,a,b,0,c,d)}Y.prototype=Object.create(D.prototype);Y.prototype.constructor=Y;Y.prototype.i=function(a,b){return!0===a.isMeMessage?new Gb(this.id,a,b):!0===a.isNotice?new Hb(this.id,a,b):new Ib(this.id,a,b)};
 var Z=function(){function a(a,d){return wa(d,{A:a.context.self.O.A,U:function(a){":"===a[0]&&":"===a[a.length-1]&&(a=a.substr(1,a.length-2));if(a=Za(a)){var b=document.createElement("span");b.className="emoji-small";b.appendChild(a);return b.outerHTML}return null},$:function(c){return b(a,c)}})}function b(a,b){var c=b.indexOf("|");if(-1===c)var d=b;else{d=b.substr(0,c);var g=b.substr(c+1)}if("@"===d[0])if(d=pa(a.context)+"|"+d.substr(1),g=I(d))a=!0,d="#"+g.oa.id,g="@"+g.name;else return null;else if("#"===
 d[0])if(d=pa(a.context)+"|"+d.substr(1),g=sa(d))a=!0,d="#"+d,g="#"+g.name;else return null;else{if(!d.match(/^(https?|mailto):\/\//i))return null;a=!1}return{link:d,text:g||d,Ia:a}}return{G:function(a){a.P=!0;return a},S:function(a){a.c&&a.c.parentElement&&(a.c.remove(),delete a.c);return a},L:function(a){a.c?a.P&&(a.P=!1,a.I()):a.ha().I();return a.c},I:function(b){var c=I(b.J);b.c.l.innerHTML=K.V(b.l);b.c.qa.innerHTML=a(b,b.text);b.c.ia.textContent=c?c.name:b.username||"?";for(var c=document.createDocumentFragment(),
@@ -104,6 +104,6 @@ function Gb(a,b,c){v.call(this,b,c);this.context=H(E.context,a);this.b=a;this.c=
 p.update=function(a,b){z.prototype.update.call(this,a,b);this.G()};function Ib(a,b,c){v.call(this,b,c);this.context=H(E.context,a);this.b=a;this.c=Z.c;this.P=Z.P}Ib.prototype=Object.create(v.prototype);p=Ib.prototype;p.constructor=Ib;p.G=function(){return Z.G(this)};p.u=function(a){return Z.u(this,a)};p.S=function(){return Z.S(this)};p.L=function(){return Z.L(this)};p.ha=function(){this.c=sb(this);return this};p.K=function(){return Z.K(this)};p.I=function(){Z.I(this);return this};
 p.update=function(a,b){v.prototype.update.call(this,a,b);this.G();if(a=this.text.match(/^<?https:\/\/www\.openstreetmap\.org\/\?mlat=(-?[0-9\.]+)(&amp;|&)mlon=(-?[0-9\.]+)(&amp;|&)macc=([0-9\.]+)[^\s]*/))this.text=this.text.substr(0,a.index)+this.text.substr(a.index+a[0].length).trim(),this.o.unshift({color:"#008000",text:a[0],footer:"Open Street Map",footer_icon:"https://www.openstreetmap.org/assets/favicon-32x32-36d06d8a01933075bc7093c9631cffd02d49b03b659f767340f256bb6839d990.png",geo:{latitude:a[1],
 longitude:a[3],accuracy:a[5]}})};function Hb(a,b,c){v.call(this,b,c);this.context=H(E.context,a);this.b=a;this.a=null;this.P=!0}Hb.prototype=Object.create(A.prototype);p=Hb.prototype;p.constructor=Hb;p.G=function(){return Z.G(this)};p.u=function(a){return Z.u(this,a)};p.S=function(){this.a&&this.a.parentElement&&(this.a.remove(),delete this.a);this.c&&delete this.c;return this};p.L=function(){Z.L(this);return this.a};p.K=function(){return this.a.cloneNode(!0)};
-p.ha=function(){this.c=sb(this);this.a=document.createElement("span");this.c.classList.add("chatmsg-notice");this.a.className="chatmsg-notice";this.a.textContent=K.La;this.a.appendChild(this.c);return this};p.I=function(){Z.I(this);return this};p.update=function(a,b){A.prototype.update.call(this,a,b);this.G()};function Bb(){var a=zb.X,b;for(b in a)if(a.hasOwnProperty(b))return!1;return!0};var zb;function Ab(a){this.X={};for(var b=0,c=a.length;b<c;b++)if(null===a[b].service&&null===a[b].device){var d=void 0,e=JSON.parse(a[b].config);if(e.services)for(d in e.services)this.X[d]=e.services[d]}};var mb=function(){var a=[];return{Ha:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},Ta:function(b){var c=[];a.forEach(function(a){for(var d=0,f=a.names.length;d<f;d++)if(a.names[d].substr(0,b.length)===b){c.push(a);break}});return c},Ya:function(b){b.R="client";b.exec=b.exec.bind(b);a.push(b)}}}();function Jb(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
-ua.push(function(){mb.Ya({name:"/sherlock",names:["/sherlock","/sharelock"],usage:"",description:K.Oa,exec:function(a,b){Jb().then(function(a){var c=a.coords.latitude,e=a.coords.longitude;Fb(b,"https://www.openstreetmap.org/?mlat="+c+"&mlon="+e+"&macc="+a.coords.accuracy+"#map=17/"+c+"/"+e)}).catch(function(a){console.error("Error: ",a)})}})});
+p.ha=function(){this.c=sb(this);this.a=document.createElement("span");this.c.classList.add("chatmsg-notice");this.a.className="chatmsg-notice";this.a.textContent=K.La;this.a.appendChild(this.c);return this};p.I=function(){Z.I(this);return this};p.update=function(a,b){A.prototype.update.call(this,a,b);this.G()};function Bb(){var a=zb.X,b;for(b in a)if(a.hasOwnProperty(b))return!1;return!0};var zb;function Ab(a){this.X={};for(var b=0,c=a.length;b<c;b++)if(null===a[b].service&&null===a[b].device){var d=void 0,e=JSON.parse(a[b].config);if(e.services)for(d in e.services)this.X[d]=e.services[d]}};var nb=function(){var a=[];return{Ha:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},Ta:function(b){var c=[];a.forEach(function(a){for(var d=0,f=a.names.length;d<f;d++)if(a.names[d].substr(0,b.length)===b){c.push(a);break}});return c},Ya:function(b){b.R="client";b.exec=b.exec.bind(b);a.push(b)}}}();function Jb(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
+ua.push(function(){nb.Ya({name:"/sherlock",names:["/sherlock","/sharelock"],usage:"",description:K.Oa,exec:function(a,b){Jb().then(function(a){var c=a.coords.latitude,e=a.coords.longitude;Fb(b,"https://www.openstreetmap.org/?mlat="+c+"&mlon="+e+"&macc="+a.coords.accuracy+"#map=17/"+c+"/"+e)}).catch(function(a){console.error("Error: ",a)})}})});
 })();

+ 2 - 1
srv/public/style.css

@@ -22,6 +22,7 @@ button, .button { border: 1px solid black; border-radius: 3px; background: rgb(2
 .chat-context { display: inline-block; max-height: 100%; width: 250px; overflow-x: hidden; overflow-y: auto; background-color: #4D394B; background-position: bottom; background-repeat: no-repeat; overflow: auto; }
 .chatsystem-container { display: flex; flex-direction: column; flex: 1; overflow: hidden; padding: 0; }
 
+.chat-context-menu a { display: block; padding: 1em 0 0 1.5em; color: #AB9BA9; text-transform: uppercase; text-decoration: none; }
 .chat-context-channellist { padding-left: 0; list-style: none; }
 .chat-context-channellist > header { color: #AB9BA9; text-transform: uppercase; margin-top: 2em; padding-left: 1.5em; }
 .chat-context-room { position: relative; color: #AB9BA9; }
@@ -208,7 +209,7 @@ button, .button { border: 1px solid black; border-radius: 3px; background: rgb(2
 .maci-content header { margin: 10px 0; }
 .maci-content footer { text-align: right; }
 
-.maci-setting { position: fixed; display: flex; flex-direction: column; top: 0; bottom: 0; left: 0; right: 0; max-width: 750px; max-height: 500px; margin: auto; background: #f5f5ff; border: 1px solid #e0e1e2; }
+.maci-setting { position: fixed; z-index: 4000; display: flex; flex-direction: column; top: 0; bottom: 0; left: 0; right: 0; max-width: 750px; max-height: 500px; margin: auto; background: #f5f5ff; border: 1px solid #e0e1e2; }
 .settingHead { background: grey; padding: 0 8px; }
 .settingBody { display: flex; margin: 8px; flex: 1; }
 .settingNav { display: inline-block; width: 150px; }

+ 3 - 1
srv/src/template/index.js

@@ -25,7 +25,9 @@ module.exports.exec = function(req, res) {
         status: 200
         ,body: templates.header("Mimouchat", ["style.css", "emojione_v2.3.sprites.css"], ['<link href="favicon_err.png" type="image/png" rel="icon" id="linkFavicon" />'])
         +`<aside class="chat-context" id="chatCtx">
-              <nav class="chat-context-menu"></nav>
+              <nav class="chat-context-menu">
+                  <a id="ctxMenuSettings" href="javascript:void(0);"></a>
+              </nav>
               <div class="chat-context-rooms" id="chatList">
                   <ul class="chat-context-channellist" id="chanList"></ul>
                   <div class="chat-context-imlist"></div>