4chan-x/src/General/Globals.coffee
Zixaphir 00541ba898 Speed E the fuck up
Conflicts:
	builds/appchan-x.user.js
	builds/crx/script.js
	src/General/Globals.coffee
2015-02-02 19:06:31 -08:00

20 lines
485 B
CoffeeScript
Executable File

Conf = {}
c = console
d = document
doc = d.documentElement
g =
VERSION: '<%= meta.version %>'
NAMESPACE: '<%= meta.name %>.'
NAME: '<%= meta.name %>'
FAQ: '<%= meta.faq %>'
CHANGELOG: '<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md'
boards: {}
E = do ->
str = {'&': '&amp;', "'": '&#039;', '"': '&quot;', '<': '&lt;', '>': '&gt;'}
r = String::replace
regex = /[&"'<>]/g
fn = (x) ->
str[x]
(text) -> r.call text, regex, fn