From 96dd1f931cfff5ce76c73b081a479a0d009f702e Mon Sep 17 00:00:00 2001 From: bojidar-bg Date: Tue, 27 Aug 2013 12:52:31 +0300 Subject: [PATCH] Small fix of function name in script.js --- script.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/script.js b/script.js index 75fe708..cfd6365 100644 --- a/script.js +++ b/script.js @@ -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 @@ -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; @@ -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]); } -} \ No newline at end of file +}