Skip to content

Commit

Permalink
Small fix of function name in script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bojidar-bg committed Aug 27, 2013
1 parent 8823dcd commit 96dd1f9
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,19 @@ function insertAtCursor(myField, myValue/*added(*/,offset/*)*/) {
}
}
//END3
document.getElementsByAttribute = function(a,b)
getElementsByAttribute = function(a,b)
{
var output = [],j=0;
//from here to END4 the code is from:
//http://stackoverflow.com/questions/8396541/javascript-to-get-elements-by-its-attribute
var arr_elms = [];
arr_elms = document.body.getElementsByTagName("*");
arr_elms = document.getElementsByTagName("pre");
var elms_len = arr_elms.length;
for (var i = 0; i < elms_len; i++) {
if(arr_elms[i].getAttribute(a) == b)//changed this line to suite my needs from:
//if(arr_elms[i].getAttribute("someAttribute") != null)
{
output[j++] = arr_elms[i]//changed this line to suite my needs from:
//alert("FOUND : " + arr_elms[i].getAttribute("someAttribute"));
}
}
//END4
Expand Down Expand Up @@ -125,15 +124,6 @@ checkActors = function()
curActor++;
}
}
themeCheck = function(cust,def)
{
var i=0;
for(i in def)
{
if(!cust[i])cust[i] = def[i];
else if(typeof(cust[i])==typeof(Object()))themeCheck(cust[i],def[i])
}
}
draw = function(el)
{
callCode = el.innerHTML;
Expand Down Expand Up @@ -438,9 +428,9 @@ draw = function(el)
}
window.onload = function()
{
callflows = document.getElementsByAttribute("callflow","true");
callflows = getElementsByAttribute("callflow","true");
for(var i = 0, max = callflows.length; i < max; i++)
{
draw(callflows[i]);
}
}
}

0 comments on commit 96dd1f9

Please sign in to comment.