From d6b339f91b32a316f1d250e087cd29981046e864 Mon Sep 17 00:00:00 2001 From: Jakub Skoczen Date: Mon, 7 Mar 2011 11:19:38 +0100 Subject: [PATCH] Only deserialize state when appropriate TING tinkers with hash as well, switching tabs resets the hash but does not re-loads the page. For now simply ignore new hash and push old state into it. --- mkdru.client.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mkdru.client.js b/mkdru.client.js index 9fcf0ae..51835ac 100644 --- a/mkdru.client.js +++ b/mkdru.client.js @@ -224,6 +224,14 @@ mkdru.uiFromState = function () { }; mkdru.hashChange = function () { + // TING hack, switching tabs resets the hash but does not re-load the page + // simply ignore new hash and set it to the old state + var hash = $.param.fragment(); + if (hash.indexOf('addon-result') == 0 || hash.indexOf('content-result') == 0 + || hash.indexOf('ting-result') == 0) { + mkdru.hashFromState(); + return; + } // do we need to restart the search? var searchTrigger = false; // shallow copy of state so we can see what changed. -- 1.7.10.4