COPS now also work if Pushstate / ReplaceState is not available (IE9). Thanks to At Libitum. should fix #117

This commit is contained in:
Sébastien Lucas 2013-11-25 21:18:38 +01:00
parent d12c7e9086
commit 1051af4a61
2 changed files with 8 additions and 2 deletions

View file

@ -101,7 +101,9 @@
updatePage (data [0]); updatePage (data [0]);
cache.put (url, data [0]); cache.put (url, data [0]);
history.replaceState(url, "", window.location); if (isPushStateEnabled) {
history.replaceState(url, "", window.location);
}
handleLinks (); handleLinks ();
}); });

View file

@ -281,7 +281,11 @@ updatePage = function (data) {
]); ]);
$('input[name=query]').bind('typeahead:selected', function(obj, datum) { $('input[name=query]').bind('typeahead:selected', function(obj, datum) {
navigateTo (datum.navlink); if (isPushStateEnabled) {
navigateTo (datum.navlink);
} else {
window.location = datum.navlink;
}
}); });
}; };