diff --git a/js/interface_common.js b/js/interface_common.js index 81b6312..07c5dfb 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -404,8 +404,6 @@ function openConversationModal(e) function watchHashChange(e) { - var hashstring = window.location.hash - hashstring = decodeURIComponent(hashstring); if(e!=null){ var prevurlsplit = e.oldURL.split('#'); @@ -427,6 +425,14 @@ function watchHashChange(e) } + loadModalFromHash(); +} + +function loadModalFromHash(){ + + var hashstring = window.location.hash + hashstring = decodeURIComponent(hashstring); + var hashdata = hashstring.split(':'); if (hashdata[0] != '#web+twister') { hashdata = hashstring.match(/(hashtag|profile|mentions|directmessages|following)\?(?:user|hashtag)=(.+)/); @@ -451,8 +457,8 @@ function watchHashChange(e) } else{ closeModalHandler(); } -} +} function initHashWatching() {