This file contains 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
plainChars = (str) -> | |
if not str? then return throw(new Error("plainChars needs a param")) | |
specialChars = "ąàáäâãåæćęèéëêìíïîłńòóöôõøśùúüûñçżź" | |
plain = "aaaaaaaaceeeeeiiiilnoooooosuuuunczz" | |
regex = new RegExp '[' + specialChars + ']', 'g' | |
str += "" | |
str.replace regex, (char) -> plain.charAt (specialChars.indexOf char) |
This file contains 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
window.dammitIE = do -> | |
is_internet_explorer = -> | |
window.navigator.appName is "Microsoft Internet Explorer" | |
get_internet_explorer_version = -> | |
matches = new RegExp(" MSIE ([0-9].[0-9]);").exec(window.navigator.userAgent) | |
return parseInt(matches[1].replace(".0", "")) if matches? and matches.length > 1 | |
true |
NewerOlder