File tree 1 file changed +12
-15
lines changed 1 file changed +12
-15
lines changed Original file line number Diff line number Diff line change @@ -173,21 +173,18 @@ export default class WebPlatform extends VectorBasePlatform {
173
173
}
174
174
175
175
getDefaultDeviceDisplayName ( ) : string {
176
- // TODO: Revert this after launch
177
- // // strip query-string and fragment from uri
178
- // const u = url.parse(window.location.href);
179
- // u.protocol = "";
180
- // u.search = "";
181
- // u.hash = "";
182
- // // Remove trailing slash if present
183
- // u.pathname = u.pathname.replace(/\/$/, "");
184
-
185
- // let appName = u.format();
186
- // // Remove leading slashes if present
187
- // appName = appName.replace(/^\/\//, "");
188
- // // `appName` is now in the format `develop.element.io`.
189
-
190
- const appName = "Riot Web" ;
176
+ // strip query-string and fragment from uri
177
+ const u = url . parse ( window . location . href ) ;
178
+ u . protocol = "" ;
179
+ u . search = "" ;
180
+ u . hash = "" ;
181
+ // Remove trailing slash if present
182
+ u . pathname = u . pathname . replace ( / \/ $ / , "" ) ;
183
+
184
+ let appName = u . format ( ) ;
185
+ // Remove leading slashes if present
186
+ appName = appName . replace ( / ^ \/ \/ / , "" ) ;
187
+ // `appName` is now in the format `develop.element.io`.
191
188
192
189
const ua = new UAParser ( ) ;
193
190
const browserName = ua . getBrowser ( ) . name || "unknown browser" ;
You can’t perform that action at this time.
0 commit comments