瀏覽代碼

Remove query parameters from the URL visible to the user

j8
paweldomas 9 年之前
父節點
當前提交
8de3e0ff0b
共有 1 個檔案被更改,包括 9 行新增4 行删除
  1. 9
    4
      modules/UI/UI.js

+ 9
- 4
modules/UI/UI.js 查看文件

280
  */
280
  */
281
 UI.initConference = function () {
281
 UI.initConference = function () {
282
     let id = APP.conference.getMyUserId();
282
     let id = APP.conference.getMyUserId();
283
-    Toolbar.updateRoomUrl(
284
-        // Do not include query parameters
285
-        // "https://example.com" + "/SomeConference1245"
286
-        window.location.origin + window.location.pathname);
283
+
284
+    // Do not include query parameters in the invite URL
285
+    // "https://example.com" + "/SomeConference1245"
286
+    var inviteURL = window.location.origin + window.location.pathname;
287
+    Toolbar.updateRoomUrl(inviteURL);
288
+    // Clean up the URL displayed by the browser
289
+    if (window.history && typeof window.history.replaceState === 'function') {
290
+        window.history.replaceState({}, document.title, inviteURL);
291
+    }
287
 
292
 
288
     // Add myself to the contact list.
293
     // Add myself to the contact list.
289
     ContactList.addContact(id);
294
     ContactList.addContact(id);

Loading…
取消
儲存