Sha256: c8dcff7eb1e69871058b8859f06892c7231ddcf73758118ad629d1a77033114f
Contents?: true
Size: 721 Bytes
Versions: 67
Compression:
Stored size: 721 Bytes
Contents
pageflow.History.HashAdapter = function() { var counter = 0; this.back = function() { if (counter > 0) { window.history.back(); counter -= 1; return true; } return false; }; this.pushState = function(state, title, hash) { if (window.location.hash !== hash) { counter += 1; window.location.hash = hash; } }; this.replaceState = function(state, title, hash) { window.location.hash = hash; }; this.state = function() { return {}; }; this.hash = function() { var match = window.location.href.match(/#(.*)$/); return match ? match[1] : ''; }; this.on = function(event, listener) { return $(window).on(event, listener); }; };
Version data entries
67 entries across 67 versions & 1 rubygems