ソースを参照

oops missing compiled js

B Thibault 8 年 前
コミット
292e98c648
1 ファイル変更3 行追加4 行削除
  1. 3 4
      srv/public/mimouchat.min.js

+ 3 - 4
srv/public/mimouchat.min.js

@@ -70,7 +70,7 @@ if(0<=d){b=b.substr(d+1);if(d=D(C.context,b)){Mb.fb(d,d.j[b]).show(a);return}a:{
 function(a){a.preventDefault();document.getElementById("fileUploadError").classList.add("hidden");document.getElementById("fileUploadContainer").classList.add("hidden");document.getElementById("fileUploadInput").value="";return!1});document.getElementById("ctxMenuLogout").addEventListener("click",Pb);document.getElementById("ctxMenuSettings").addEventListener("click",function(a){a.preventDefault();Qb.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),Rb(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();Q&&document.getElementById("fileUploadContainer").classList.remove("hidden");
 return!1});document.getElementById("msgFormSubmit").addEventListener("click",function(a){a.preventDefault();fb();return!1});document.getElementById("msgForm").addEventListener("submit",function(a){a.preventDefault();fb();return!1});window.addEventListener("blur",function(){window.hasFocus=!1});window.addEventListener("focus",function(){window.hasFocus=!0;hb=0;Q&&vb();T()});document.getElementById("chatWindow").addEventListener("scroll",Db);window.hasFocus=!0;document.getElementById("emojiButton").addEventListener("click",
-function(){P&&Fb.qa(document.body,P,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");T()})});Sb()&&(__native.readSmsPermission("onSmsPermissionUpdated"),document.body.classList.add("native"));IS_LOCAL||Tb()});function fb(){var a=document.getElementById("msgInput");Q&&a.value&&ab(a.value)&&(a.value="",S&&(S=null,V()),R&&(R=null,V()),document.getElementById("slashList").textContent="",db(a));T()};var Qb=function(){function a(){document.getElementById("settings").classList.add("hidden");c=!1}function b(a){d&&(document.getElementById("settings").classList.remove("display-"+d),document.getElementById("setting-menu-"+d).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");d=a}var c=!1,d=null,e={U:"services",
+function(){P&&Fb.qa(document.body,P,function(a){a&&(document.getElementById("msgInput").value+=":"+a+":");T()})});Sb()&&(__native.readSmsPermission(),document.body.classList.add("native"));IS_LOCAL||Tb()});function fb(){var a=document.getElementById("msgInput");Q&&a.value&&ab(a.value)&&(a.value="",S&&(S=null,V()),R&&(R=null,V()),document.getElementById("slashList").textContent="",db(a));T()};var Qb=function(){function a(){document.getElementById("settings").classList.add("hidden");c=!1}function b(a){d&&(document.getElementById("settings").classList.remove("display-"+d),document.getElementById("setting-menu-"+d).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");d=a}var c=!1,d=null,e={U:"services",
 display:"display",Qb:"privacy"};document.getElementById("settingMenuItems").addEventListener("click",function(a){for(var c=a.target;a.currentTarget!==c&&c;c=c.parentNode)if(c.dataset&&c.dataset.target)for(var d in e)if(e[d]===c.dataset.target){b(e[d]);return}});document.getElementById("settingDiscardClose").addEventListener("click",a);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});document.getElementById("settingCommit").addEventListener("click",function(){var b={};document.getElementById("settings-displayEmojiProvider").value!==X.h&&(b.emojiProvider=document.getElementById("settings-displayEmojiProvider").value);var c=!!document.getElementById("settings-displayDisplayAvatar").checked;
 c!==(!1!==X.a)&&(b.displayAvatar=c);c=!!document.getElementById("settings-displayColorfulNames").checked;c!==(!0===X.b)&&(b.colorfulNames=c);var c=X,d;for(d in b){Ub(c,b);Vb();O(new K("POST","api/settings?service=null&device=null"),JSON.stringify(b));break}a()});return{display:function(a){if(!c){document.getElementById("settings").classList.remove("hidden");var d=document.createDocumentFragment(),f=!1,g;for(g in X.U){var n=X.U[g];for(m in n){var f=document.createElement("li"),p=document.createElement("span"),
@@ -113,8 +113,7 @@ c(h,function(c){a(g,c);x[b]=k.toDataURL();y[b].forEach(function(a){a(x[b])})})}}
 function hc(){var a=Q;O(Ca(N(Fa(new K("api/hist?room="+a.id),"json"),function(b,c,d){if(d){b=C.a[a.id];var e=Date.now();b?c=!!la(b,d,e):(b=C.a[a.id]=new Y(a,100,d,e),c=!0);c&&(b.a.length&&ha(a,na(b).m,e),fc(D(C.context,a.id),a,d),a===Q&&ub())}}),function(){}))}function Vb(){a:{var a=X.U;for(var b in a)if(a.hasOwnProperty(b)){a=!1;break a}a=!0}a&&Qb.Bb(!1).display(Qb.yb.U);a=X.h;ic(a&&Wb[a]?Wb[a]:jc);document.getElementById("customsheet").innerHTML=kc()}
 function Tb(){var a=lc;IS_LOCAL||O(Ea(Fa(Ca(new K("api?v="+C.b),function(b,c,d){(b=2===Math.floor(b/100))?W&&(W=0,rb(!0)):W?(W+=Math.floor((W||5)/2),W=Math.min(60,W)):(W=5,rb(!1));a(b,d)}),"json")))}function lc(a,b){a?(b&&C.update(b),Tb()):setTimeout(mc,1E3*W)}function mc(){Tb()}function zb(a){if(Sb()){var b=!(!P||!P.W.starChannel);__native.setTitle(a,b,b?Q.A:!1)}}
 function nc(a){Q&&(document.getElementById("room_"+Q.id).classList.remove("selected"),document.getElementById("chatSystemContainer").classList.add("no-room-selected"));document.getElementById("room_"+a.id).classList.add("selected");document.body.classList.remove("no-room-selected");Q=a;P=D(C.context,a.id);Sb&&__native.setCurrentChannel(a.id);tb();Mb.sb();nb(P.a.id,P.i,function(a){document.getElementById("chatCtx").style.backgroundImage="url("+a+")"});(!C.a[Q.id]||100>C.a[Q.id].a.length)&&hc();document.getElementById("chatSystemContainer").classList.remove("no-room-selected");
-document.getElementById("chatCtx").classList.remove("opened")}function Sb(){return!!("__native"in window)}function mb(){var a=document.location.hash.substr(1),b=wa(a);b&&b!==Q?nc(b):(a=F(a))&&a.O&&nc(a.O)}function Ob(a){O(new K("POST","api/starChannel?room="+a.id))}function Nb(a){O(new K("POST","api/unstarChannel?room="+a.id))}
-function Rb(a,b,c){var d=Q;new FileReader;var e=new FormData;e.append("file",b);e.append("filename",a);O(Da(N(new K("POST","api/file?room="+d.id),function(){c(null)}),function(a,b){c(b)}),e)}
+document.getElementById("chatCtx").classList.remove("opened")}function mb(){var a=document.location.hash.substr(1),b=wa(a);b&&b!==Q?nc(b):(a=F(a))&&a.O&&nc(a.O)}function Ob(a){O(new K("POST","api/starChannel?room="+a.id))}function Nb(a){O(new K("POST","api/unstarChannel?room="+a.id))}function Rb(a,b,c){var d=Q;new FileReader;var e=new FormData;e.append("file",b);e.append("filename",a);O(Da(N(new K("POST","api/file?room="+d.id),function(){c(null)}),function(a,b){c(b)}),e)}
 function cb(a,b,c,d){b="api/msg?room="+a.id+"&text="+encodeURIComponent(b);d&&(b+="&attachments="+encodeURIComponent(JSON.stringify([{fallback:d.text,author_name:F(d.K).getName(),text:d.text,footer:a.h?J.message:a.name,ts:d.m}])));O(N(Fa(new K("POST",b),"json"),function(a,b,d){d&&void 0!==d.pendingId&&(c.na=d.pendingId)}))}function Gb(a,b){O(new K("DELETE","api/pinMsg?room="+a.id+"&msgId="+b.id))}
 function xb(a,b,c){O(new K("POST","api/reaction?room="+a+"&msg="+b+"&reaction="+encodeURIComponent(c)))}function Pb(){O(new K("POST","api/logout"));document.cookie="sessID=;Path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;";document.location.reload();Sb()&&__native.logout()}
 function lb(){var a={},b=[],c=this.value;ua(C.context,function(b){a[b.id]=ia(b,c)});for(var d in a){var e=document.getElementById("room_"+d);e&&(a[d].name+a[d].ma+a[d].ta+a[d].pa?(e.classList.remove("hidden"),b.push(d)):e.classList.add("hidden"))}};var Wb={noemoji:{Da:"noemoji.js",ia:null,name:"None"},emojione_v2_3:{Da:"emojione_v2.3.sprites.js",ia:"emojione_v2.3.sprites.css",name:"Emojione v2.3"},emojione_v3:{Da:"emojione_v3.sprites.js",ia:"emojione_v3.sprites.css",name:"Emojione v3"}},jc=Wb.emojione_v2_3,Ya;
@@ -140,6 +139,6 @@ q.za=function(){this.c=Zb(this);this.a=document.createElement("span");this.c.cla
 function Hb(a,b){var c=Zb(null);c.classList.add("chatmsg-pending");b&&c.classList.add("chatmsg-me_message");c.ra.innerHTML=Aa(a,{Y: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}});c.ha.textContent=P.self?P.self.getName():"";a=document.createElement("span");a.className="typing-dot1";a.textContent=".";c.m.appendChild(a);a=document.createElement("span");
 a.className="typing-dot2";a.textContent=".";c.m.appendChild(a);a=document.createElement("span");a.className="typing-dot3";a.textContent=".";c.m.appendChild(a);c.m.classList.add("typing-container");return c};var X;function gc(a){this.U={};for(var b=0,c=a.length;b<c;b++)null===a[b].service&&null===a[b].device&&Ub(this,JSON.parse(a[b].config))}function Ub(a,b){if(b.services)for(var c in b.services)a.U[c]=b.services[c];void 0!==b.emojiProvider&&(a.h=b.emojiProvider);void 0!==b.displayAvatar&&(a.a=b.displayAvatar);void 0!==b.colorfulNames&&(a.b=b.colorfulNames)}
 function kc(){var a=X,b={},c="";!1===a.a&&(b[".chatsystem-content .chatmsg-authorGroup .chatmsg-author-img-wrapper"]=["display: none"],b[".chatsystem-content .chatmsg-authorGroup"]=["display: flex"],b[".chatsystem-content .chatmsg-authorGroup .chatmsg-author"]=["position:initial","vertical-align:top","min-width:75px"],b[".chatsystem-content .chatmsg-authorGroup .chatmsg-author-messages"]=["padding-top:0","padding-left:0","display:inline-block","margin-top:-4px","flex:1"],b[".chatmsg-author-name::before"]=
-["content:'<'"],b[".chatmsg-author-name::after"]=["content:'>'"]);!0===a.b||(b[".chatmsg-authorGroup .chatmsg-item .chatmsg-link-user, .chatsystem-content a.chatmsg-author-name, .chatmsg-author-name"]=["background-color: transparent !important;"]);for(var d in b)c+=d+"{",b[d].forEach(function(a){c+=a+";"}),c+="}";return c}X=new gc([]);window.displayMenu=function(){document.getElementById("chatCtx").classList.add("opened")};window.hideMenu=function(){document.getElementById("chatCtx").classList.remove("opened")};window.toggleMenu=function(){Kb()};window.setChannelFavorite=function(a,b){var c=wa(a);c?b?Ob(c):Nb(c):console.error("Channel "+a+" not found")};window.onSmsPermissionUpdated=function(a){"__native"in window&&a&&(a=JSON.parse(__native.getStatic()))&&C.update(a)};var $a=function(){var a=[];return{Ya:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},qb: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},Ab:function(b){b.X="client";b.exec=b.exec.bind(b);a.push(b)}}}();function sc(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
+["content:'<'"],b[".chatmsg-author-name::after"]=["content:'>'"]);!0===a.b||(b[".chatmsg-authorGroup .chatmsg-item .chatmsg-link-user, .chatsystem-content a.chatmsg-author-name, .chatmsg-author-name"]=["background-color: transparent !important;"]);for(var d in b)c+=d+"{",b[d].forEach(function(a){c+=a+";"}),c+="}";return c}X=new gc([]);window.displayMenu=function(){document.getElementById("chatCtx").classList.add("opened")};window.hideMenu=function(){document.getElementById("chatCtx").classList.remove("opened")};window.toggleMenu=function(){Kb()};window.setChannelFavorite=function(a,b){var c=wa(a);c?b?Ob(c):Nb(c):console.error("Channel "+a+" not found")};window.onSmsPermissionUpdated=function(a){"__native"in window&&a&&(a=JSON.parse(__native.getStatic()))&&C.update(a)};function Sb(){return!!("__native"in window)};var $a=function(){var a=[];return{Ya:function(b){for(var c=0,d=a.length;c<d;c++)if(-1!==a[c].names.indexOf(b))return a[c];return null},qb: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},Ab:function(b){b.X="client";b.exec=b.exec.bind(b);a.push(b)}}}();function sc(){return new Promise(function(a,b){"geolocation"in window.navigator?navigator.geolocation.getCurrentPosition(function(c){c?a(c):b("denied")}):b("geolocation not available")})}
 ya.push(function(){$a.Ab({name:"/sherlock",names:["/sherlock","/sharelock"],usage:"",description:J.jb,exec:function(a,b){sc().then(function(a){var c=a.coords.latitude,e=a.coords.longitude;cb(b,"https://www.openstreetmap.org/?mlat="+c+"&mlon="+e+"&macc="+a.coords.accuracy+"#map=17/"+c+"/"+e)}).catch(function(a){console.error("Error: ",a)})}})});
 })();