mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 08:17:58 -05:00
Apparently, IE doesn't allow string indexing in javascript using [].
This commit is contained in:
@@ -240,14 +240,14 @@ function handleResponse(action) {
|
||||
|
||||
function re_id_node(node, id) {
|
||||
function add_id(s) {
|
||||
if(s && typeof(s) == "string") {
|
||||
if(s[s.length-1] != '_') s += '_';
|
||||
if(id && s && typeof(s) == "string") {
|
||||
if(s.substr(s.length-1) != '_') s += '_';
|
||||
s += id;
|
||||
}
|
||||
return s;
|
||||
}
|
||||
node.id = add_id(node.id);
|
||||
node.htmlFor = add_id(node.htmlFor);
|
||||
if(node.id) { node.id = add_id(node.id); }
|
||||
if(node.htmlFor) { add_id(node.htmlFor); }
|
||||
var children = node.childNodes;
|
||||
for(var i = 0; i < children.length; i++) {
|
||||
re_id_node(children[i], id);
|
||||
|
||||
Reference in New Issue
Block a user