Speed E the fuck up

Conflicts:
	builds/appchan-x.user.js
	builds/crx/script.js
	src/General/Globals.coffee
This commit is contained in:
Zixaphir 2015-01-13 10:29:34 -07:00 committed by ccd0
parent a993cb8244
commit 00541ba898

View File

@ -9,6 +9,11 @@ g =
FAQ: '<%= meta.faq %>'
CHANGELOG: '<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md'
boards: {}
E = (text) ->
(text+'').replace /[&"'<>]/g, (x) ->
{'&': '&amp;', "'": '&#039;', '"': '&quot;', '<': '&lt;', '>': '&gt;'}[x]
E = do ->
str = {'&': '&amp;', "'": '&#039;', '"': '&quot;', '<': '&lt;', '>': '&gt;'}
r = String::replace
regex = /[&"'<>]/g
fn = (x) ->
str[x]
(text) -> r.call text, regex, fn