From 6174c5a87fb1e23e9f3da57b5ba621f9fbd5170e Mon Sep 17 00:00:00 2001 From: Shawn Allen Date: Fri, 6 Jan 2012 14:43:48 -0800 Subject: [PATCH] Updated MM.Hash to throttle hash updates Per @tmcw's request, MM.Hash now throttles hash updates (like Wax). This means less frequent hash.replace() calls, which should make it nicer to use on browsers (*cough* IE) that do stupid things like play clicking sounds whenever the URL changes. Also, removed standalone Hash implementation from examples/hash, and made sure that the map gets an initial center & zoom so that it doesn't redirect to #0/0/0 if loaded without a hash. --- examples/hash/index.html | 2 +- examples/hash/modestmaps.hash.js | 128 ------------------------------- modestmaps.js | 22 +++++- modestmaps.min.js | 2 +- src/hash.js | 24 +++++- 5 files changed, 42 insertions(+), 136 deletions(-) delete mode 100644 examples/hash/modestmaps.hash.js diff --git a/examples/hash/index.html b/examples/hash/index.html index 2121ebf..0633917 100644 --- a/examples/hash/index.html +++ b/examples/hash/index.html @@ -3,7 +3,6 @@ ModestMaps JS: Hash URLs -