Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added ahoward's fix to jquery.postmessage to keep hash clean for olde…

  • Loading branch information...
commit f7bb2f10ecbdcd9a139c0697587af5615e613f80 1 parent b54435c
Thomas Sturm authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 ender-postmessage.js
10 ender-postmessage.js
View
@@ -24,6 +24,7 @@
// A few vars used in non-awesome browsers
var interval_id,
last_hash,
+ original_hash,
cache_bust = 1,
// A var used in awesome browsers.
@@ -178,11 +179,18 @@
? delay
: 100;
+ original_hash = document.location.hash;
+
interval_id = setInterval(function(){
var hash = document.location.hash,
re = /^#?\d+&/;
- if ( hash !== last_hash && re.test( hash ) ) {
+ if ( hash !== last_hash && hash !== original_hash && re.test( hash ) ) {
last_hash = hash;
+ if ( original_hash ) {
+ document.location.hash = original_hash;
+ } else {
+ document.location.hash = '';
+ }
callback({ data: hash.replace( re, '' ) });
}
}, delay );
Please sign in to comment.
Something went wrong with that request. Please try again.