From 2ce47540435d892c58b1eea47ea2e21551210f8d Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Thu, 25 Jun 2015 19:09:59 -0400 Subject: [PATCH] Remove Google Analytics ugly URLs Google Analytics adds weird things to the URL when linking cross- domain. This removes them after loading for less ugliness. --- js/client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/client.js b/js/client.js index d0611fe9e..e3b729646 100644 --- a/js/client.js +++ b/js/client.js @@ -802,6 +802,9 @@ // Just open the main menu. fragment = ''; } + if (location.search && window.history) { + history.replaceState(null, null, '/'); + } fragment = toRoomid(fragment || ''); if (this.initialFragment === undefined) this.initialFragment = fragment; this.tryJoinRoom(fragment);