Permalink
Browse files

Now uses history.replaceState - if present.

  • Loading branch information...
1 parent 328d444 commit 1f1e5bccf19d31e2029f0794de9b9fb16c3e270f @mworrell mworrell committed May 31, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 modules/mod_base/lib/js/modules/scrollpaluza.js
View
7 modules/mod_base/lib/js/modules/scrollpaluza.js
@@ -40,7 +40,12 @@
}
}
if (best) {
- document.location.hash = '#'+best.id;
+ if (window.history.replaceState) {
+ var ps = window.location.href.split('#');
+ window.history.replaceState(null, this.title, ps[0]+"#"+ best.id);
+ } else {
+ document.location.hash = '#'+best.id;
+ }
}
waiting=false;
}, 150);

0 comments on commit 1f1e5bc

Please sign in to comment.