You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
17 KiB
1 line
17 KiB
5 years ago
|
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1506)}({1506:function(t,e,r){"use strict";r.r(e);var n=r(33),o=r.n(n),i=r(52),a=r.n(i),u=r(243);function s(){document.cookie="riot_mobile_redirect_to_guide=false;path=/;max-age=14400",window.location.href="../"}function c(t){t="<h2>Error loading Riot</h2><p>".concat(t,"</p><p>").concat("If this is unexpected, please contact your system administrator or technical support representative.","</p>");var e=document.getElementsByClassName("mx_HomePage_container"),r=document.getElementsByClassName("mx_HomePage_errorContainer"),n=!0,o=!1,i=void 0;try{for(var a,u=e[Symbol.iterator]();!(n=(a=u.next()).done);n=!0){a.value.innerHTML=""}}catch(t){o=!0,i=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw i}}var s=!0,c=!1,l=void 0;try{for(var f,d=r[Symbol.iterator]();!(s=(f=d.next()).done);s=!0){var h=f.value;h.style.display="block",h.innerHTML=t}}catch(t){c=!0,l=t}finally{try{s||null==d.return||d.return()}finally{if(c)throw l}}}function l(){return(l=a()(o.a.mark((function t(){var e,r,n,i,a,l,f,d,h,p;return o.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return document.getElementById("back_to_riot_button").onclick=s,t.next=3,Object(u.a)("..");case 3:if(e=t.sent,r=e.default_server_config,n=e.default_server_name,i=e.default_hs_url,a=e.default_is_url,!((l=[r,n,i].filter((function(t){return!!t}))).length>1)){t.next=11;break}return t.abrupt("return",c("Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url."));case 11:if(!(l.length<1)){t.next=13;break}return t.abrupt("return",c("Invalid configuration: no default server specified."));case 13:if(f="",d="",r&&r["m.homeserver"]&&(f=r["m.homeserver"].base_url,r["m.identity_server"]&&(d=r["m.identity_server"].base_url)),!n){t.next=31;break}return t.prev=17,t.next=20,fetch("https://".concat(n,"/.well-known/matrix/client"));case 20:return h=t.sent,t.next=23,h.json();case 23:(p=t.sent)&&p["m.homeserver"]&&(f=p["m.homeserver"].base_url,p["m.identity_server"]&&(d=p["m.identity_server"].base_url)),t.next=31;break;case 27:return t.prev=27,t.t0=t.catch(17),console.error(t.t0),t.abrupt("return",c("Unable to fetch homeserver configuration"));case 31:if(i&&(f=i,d=a),f){t.next=34;break}return t.abrupt("return",c("Unable to locate homeserver"));case 34:f&&!f.endsWith("/")&&(f+="/"),d&&!d.endsWith("/")&&(d+="/"),"https://matrix.org/"!==f&&(document.getElementById("configure_riot_button").href="https://riot.im/config/config?hs_url="+encodeURIComponent(f)+"&is_url="+encodeURIComponent(d),document.getElementById("step1_heading").innerHTML="1: Install the app",document.getElementById("step2_container").style.display="block",document.getElementById("hs_url").innerText=f,d&&(document.getElementById("custom_is").style.display="block",document.getElementById("is_url").style.display="block",document.getElementById("is_url").innerText=d));case 37:case"end":return t.stop()}}),t,null,[[17,27]])})))).apply(this,arguments)}!function(){l.apply(this,arguments)}()},186:function(t,e,r){var n=function(t){"use strict";var e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",i=n.asyncIterator||"@@asyncIterator",a=n.t
|