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
| var MyRequestsCompleted = (function() { | |
| var numRequestToComplete, requestsCompleted, callBacks, singleCallBack; | |
| return function(options) { | |
| if (!options) options = {}; | |
| numRequestToComplete = options.numRequest || 0; | |
| requestsCompleted = options.requestsCompleted || 0; | |
| callBacks = []; | |
| var fireCallbacks = function() { |
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
| find ./ -type f -exec dos2unix {} \; |
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
| function countVisibleWords(el){ | |
| var padding, em, numChars, numWords; | |
| var text = $(el).text(); | |
| var textArr = text.split(' '); | |
| var max = el.clientHeight; | |
| var tmp = document.createElement(el.tagName.toLowerCase()); | |
| tmp.className = el.className + " -temp"; | |
| // document.body.appendChild(tmp); |
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
| // Match literal \r and literal \n | |
| '<p>' + (str || '').split(/(?:\\[rn])+/g).join('</p><p>') + '</p>'; | |
| // Match all carriage returns \r, newlines \n and also literal \r and literal \n | |
| '<p>' + (str || '').split(/(?:\\[rn]|[\r\n]+)+/g).join('</p><p>') + '</p>'; |
OlderNewer