Use charAt to appease IE7 users.
This commit is contained in:
parent
34d5f330fe
commit
598fef93fd
@ -106,7 +106,7 @@
|
|||||||
PhotoFloat.cachePath = function(path) {
|
PhotoFloat.cachePath = function(path) {
|
||||||
if (path === "")
|
if (path === "")
|
||||||
return "root";
|
return "root";
|
||||||
if (path[0] === "/")
|
if (path.charAt(0) === "/")
|
||||||
path = path.substring(1);
|
path = path.substring(1);
|
||||||
path = path
|
path = path
|
||||||
.replace(/ /g, "_")
|
.replace(/ /g, "_")
|
||||||
@ -155,15 +155,15 @@
|
|||||||
};
|
};
|
||||||
PhotoFloat.cleanHash = function(hash) {
|
PhotoFloat.cleanHash = function(hash) {
|
||||||
while (hash.length) {
|
while (hash.length) {
|
||||||
if (hash[0] === "#")
|
if (hash.charAt(0) === "#")
|
||||||
hash = hash.substring(1);
|
hash = hash.substring(1);
|
||||||
else if (hash[0] === "!")
|
else if (hash.charAt(0) === "!")
|
||||||
hash = hash.substring(1);
|
hash = hash.substring(1);
|
||||||
else if (hash[0] === "/")
|
else if (hash.charAt(0) === "/")
|
||||||
hash = hash.substring(1);
|
hash = hash.substring(1);
|
||||||
else if (hash.substring(0, 3) === "%21")
|
else if (hash.substring(0, 3) === "%21")
|
||||||
hash = hash.substring(3);
|
hash = hash.substring(3);
|
||||||
else if (hash[hash.length - 1] === "/")
|
else if (hash.charAt(hash.length - 1) === "/")
|
||||||
hash = hash.substring(0, hash.length - 1);
|
hash = hash.substring(0, hash.length - 1);
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user