X-Git-Url: http://git.euphorik.ch/?p=pompage.git;a=blobdiff_plain;f=doc%2Fwebdeveloper%2Fcommon%2Farray.js;fp=doc%2Fwebdeveloper%2Fcommon%2Farray.js;h=0000000000000000000000000000000000000000;hp=a70ad6d19ef1d6d76e6a55377aad544715118ec5;hb=eb7467621891b71883916c90f91bddf4c38d615f;hpb=de6efc861c1f471125cb4d3ab3d0f82572b3d21b diff --git a/doc/webdeveloper/common/array.js b/doc/webdeveloper/common/array.js deleted file mode 100644 index a70ad6d..0000000 --- a/doc/webdeveloper/common/array.js +++ /dev/null @@ -1,58 +0,0 @@ -// Returns true if the array contains the element -function webdeveloper_contains(array, element) -{ - // If the array and element are set - if(array && element) - { - try - { - // If the element does not exist in the array - if(array.indexOf(element) == -1) - { - return false; - } - else - { - return true; - } - } - catch(exception) - { - var arrayLength = array.length; - - // Loop through the array - for(var i = 0; i < arrayLength; i++) - { - // If the element is found - if(array[i] == element) - { - return true; - } - } - } - } - - return false; -} - -// Returns true if the array contains media with the given URL -function webdeveloper_mediaArrayContains(array, url) -{ - // If the array and url are set - if(array && url) - { - var arrayLength = array.length; - - // Loop through the array - for(var i = 0; i < arrayLength; i++) - { - // If media with the given URL is found - if(array[i].src == url) - { - return true; - } - } - } - - return false; -}