This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(!String.whenInDOM){ | |
| if(!String.defaultReplacementTimeout) | |
| String.defaultReplacementTimeout = 16384; | |
| String.implement({ | |
| whenInDOM : function( | |
| callback, | |
| delayCallback, | |
| timeoutCallback, | |
| timeout, | |
| counter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(!String.regexEncode){ | |
| String.regexChars = ['\\', '&','^', '$', '*', '+', '?', '.', '(', ')', '|', '{', '}', '[', ']']; | |
| String.regexEncodeRegexObject = new RegExp('([\\'+String.regexChars.join('|\\')+'])', 'g'); | |
| String.implement({ | |
| regexEncode : function(){ | |
| return this.replace(String.regexEncodeRegexObject, '\\$1'); | |
| } | |
| }); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(!Function.actionTimeout) Function.actionTimeout = 16384; | |
| if(!Function.whenTrue){ | |
| Function.implement({ | |
| whenTrue : function(actionFunction, args, delayFunction, timeoutFunction, timeout, counter){ | |
| if(!timeout) timeout = Function.actionTimeout; | |
| if(!counter) counter = 0; | |
| if(!timeoutFunction) timeoutFunction = function(event){ | |
| throw('Condition not met after '+event.time+'ms'); | |
| }; | |
| var result = this(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if(!Element.siblingsBefore){ | |
| Element.implement({ | |
| siblingsBefore : function(){ | |
| var results = []; | |
| var found = false; | |
| this.getParent().getChildren().each(function(child){ | |
| if(this == child) found = true; | |
| if(!found) results.push(child); | |
| }); | |
| return new Elements(results); |
NewerOlder