Subversion Repositories HomeAutomation

Rev

Rev 1609 | Rev 1619 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed

Rev 1609 Rev 1614
Line 31... Line 31...
31
   
31
   
32
    for (var m in parent.prototype)
32
    for (var m in parent.prototype)
33
    {
33
    {
34
        descendant.prototype[m] = parent.prototype[m];
34
        descendant.prototype[m] = parent.prototype[m];
35
    }
35
    }
-
 
36
}
-
 
37
 
-
 
38
Array.prototype.contains = function(item)
-
 
39
{
-
 
40
    for (var n in this)
-
 
41
    {
-
 
42
        if (this[n] == item)
-
 
43
        {
-
 
44
            return true;
-
 
45
        }
-
 
46
    }
-
 
47
   
-
 
48
    return false;
36
}
49
}
37
 
50
 
38
String.prototype.ltrim = function(charlist)
51
String.prototype.ltrim = function(charlist)
39
{
52
{
40
    charlist = !charlist ? ' \s\xA0' : charlist.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '\$1');
53
    charlist = !charlist ? ' \s\xA0' : charlist.replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g, '\$1');