1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-06-28 15:27:43 +00:00

3.5.217. Well, this commit is a bit late. Look at changelog.html for details on each version's changes.

This commit is contained in:
SirStendec 2016-06-22 14:23:03 -04:00
parent 2f7dc1d8d3
commit 8cfef363f1
22 changed files with 634 additions and 191 deletions

View file

@ -29,6 +29,10 @@ var sanitize_el = document.createElement('span'),
return msg.replace(R_AMP, "&").replace(R_QUOTE, """).replace(R_SQUOTE, "'").replace(R_LT, "<").replace(R_GT, ">");
},
quote_san = function(msg) {
return sanitize(msg).replace(R_QUOTE, """).replace(R_SQUOTE, "'");
},
HUMAN_NUMBERS = [
"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"
],
@ -333,6 +337,10 @@ module.exports = FFZ.utils = {
closer = show_modal(contents, cb, width);
try {
input.focus();
} catch(err) { }
form.addEventListener('submit', function(e) { e.preventDefault(); cb(true); return false });
okay_btn.addEventListener('click', function(e) { e.preventDefault(); cb(true); return false });
close_btn.addEventListener('click', function(e) { e.preventDefault(); cb(false); return false });
@ -423,6 +431,7 @@ module.exports = FFZ.utils = {
sanitize: sanitize,
unquote_attr: unquote_attr,
quote_attr: quote_attr,
quote_san: quote_san,
date_string: function(date) {
return date.getFullYear() + "-" + (date.getMonth()+1) + "-" + date.getDate();