From 598fef93fd7aafd6845b777c344b22b971fe4526 Mon Sep 17 00:00:00 2001 From: Antonio Galea Date: Wed, 22 Aug 2012 17:03:37 +0200 Subject: Use charAt to appease IE7 users. --- web/js/010-libphotofloat.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/js/010-libphotofloat.js b/web/js/010-libphotofloat.js index fb469a0..30cf889 100644 --- a/web/js/010-libphotofloat.js +++ b/web/js/010-libphotofloat.js @@ -106,7 +106,7 @@ PhotoFloat.cachePath = function(path) { if (path === "") return "root"; - if (path[0] === "/") + if (path.charAt(0) === "/") path = path.substring(1); path = path .replace(/ /g, "_") @@ -155,15 +155,15 @@ }; PhotoFloat.cleanHash = function(hash) { while (hash.length) { - if (hash[0] === "#") + if (hash.charAt(0) === "#") hash = hash.substring(1); - else if (hash[0] === "!") + else if (hash.charAt(0) === "!") hash = hash.substring(1); - else if (hash[0] === "/") + else if (hash.charAt(0) === "/") hash = hash.substring(1); else if (hash.substring(0, 3) === "%21") hash = hash.substring(3); - else if (hash[hash.length - 1] === "/") + else if (hash.charAt(hash.length - 1) === "/") hash = hash.substring(0, hash.length - 1); else break; -- cgit v1.2.3-59-g8ed1b