Speed E the fuck up
This commit is contained in:
parent
ba380613ed
commit
7e6720ee4d
@ -508,17 +508,24 @@
|
|||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
E = function(text) {
|
E = (function() {
|
||||||
return (text + '').replace(/[&"'<>]/g, function(x) {
|
var fn, r, regex, str;
|
||||||
return {
|
str = {
|
||||||
'&': '&',
|
'&': '&',
|
||||||
"'": ''',
|
"'": ''',
|
||||||
'"': '"',
|
'"': '"',
|
||||||
'<': '<',
|
'<': '<',
|
||||||
'>': '>'
|
'>': '>'
|
||||||
}[x];
|
};
|
||||||
});
|
r = String.prototype.replace;
|
||||||
};
|
regex = /[&"'<>]/g;
|
||||||
|
fn = function(x) {
|
||||||
|
return str[x];
|
||||||
|
};
|
||||||
|
return function(text) {
|
||||||
|
return r.call(text, regex, fn);
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
Mascots = {
|
Mascots = {
|
||||||
'Akiyama_Mio': {
|
'Akiyama_Mio': {
|
||||||
|
|||||||
@ -480,17 +480,24 @@
|
|||||||
boards: {}
|
boards: {}
|
||||||
};
|
};
|
||||||
|
|
||||||
E = function(text) {
|
E = (function() {
|
||||||
return (text + '').replace(/[&"'<>]/g, function(x) {
|
var fn, r, regex, str;
|
||||||
return {
|
str = {
|
||||||
'&': '&',
|
'&': '&',
|
||||||
"'": ''',
|
"'": ''',
|
||||||
'"': '"',
|
'"': '"',
|
||||||
'<': '<',
|
'<': '<',
|
||||||
'>': '>'
|
'>': '>'
|
||||||
}[x];
|
};
|
||||||
});
|
r = String.prototype.replace;
|
||||||
};
|
regex = /[&"'<>]/g;
|
||||||
|
fn = function(x) {
|
||||||
|
return str[x];
|
||||||
|
};
|
||||||
|
return function(text) {
|
||||||
|
return r.call(text, regex, fn);
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
Mascots = {
|
Mascots = {
|
||||||
'Akiyama_Mio': {
|
'Akiyama_Mio': {
|
||||||
|
|||||||
@ -14,6 +14,10 @@ g =
|
|||||||
CHANGELOG: '<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md'
|
CHANGELOG: '<%= meta.repo %>blob/<%= meta.mainBranch %>/CHANGELOG.md'
|
||||||
boards: {}
|
boards: {}
|
||||||
|
|
||||||
E = (text) ->
|
E = do ->
|
||||||
(text+'').replace /[&"'<>]/g, (x) ->
|
str = {'&': '&', "'": ''', '"': '"', '<': '<', '>': '>'}
|
||||||
{'&': '&', "'": ''', '"': '"', '<': '<', '>': '>'}[x]
|
r = String::replace
|
||||||
|
regex = /[&"'<>]/g
|
||||||
|
fn = (x) ->
|
||||||
|
str[x]
|
||||||
|
(text) -> r.call text, regex, fn
|
||||||
Loading…
x
Reference in New Issue
Block a user