Edit File by line
/home/barbar84/www/wp-inclu.../js
File: twemoji.js
/////////////////////////
[500] Fix | Delete
// exported functions //
[501] Fix | Delete
// declaration //
[502] Fix | Delete
/////////////////////////
[503] Fix | Delete
[504] Fix | Delete
function fromCodePoint(codepoint) {
[505] Fix | Delete
var code = typeof codepoint === 'string' ?
[506] Fix | Delete
parseInt(codepoint, 16) : codepoint;
[507] Fix | Delete
if (code < 0x10000) {
[508] Fix | Delete
return fromCharCode(code);
[509] Fix | Delete
}
[510] Fix | Delete
code -= 0x10000;
[511] Fix | Delete
return fromCharCode(
[512] Fix | Delete
0xD800 + (code >> 10),
[513] Fix | Delete
0xDC00 + (code & 0x3FF)
[514] Fix | Delete
);
[515] Fix | Delete
}
[516] Fix | Delete
[517] Fix | Delete
function parse(what, how) {
[518] Fix | Delete
if (!how || typeof how === 'function') {
[519] Fix | Delete
how = {callback: how};
[520] Fix | Delete
}
[521] Fix | Delete
// if first argument is string, inject html <img> tags
[522] Fix | Delete
// otherwise use the DOM tree and parse text nodes only
[523] Fix | Delete
return (typeof what === 'string' ? parseString : parseNode)(what, {
[524] Fix | Delete
callback: how.callback || defaultImageSrcGenerator,
[525] Fix | Delete
attributes: typeof how.attributes === 'function' ? how.attributes : returnNull,
[526] Fix | Delete
base: typeof how.base === 'string' ? how.base : twemoji.base,
[527] Fix | Delete
ext: how.ext || twemoji.ext,
[528] Fix | Delete
size: how.folder || toSizeSquaredAsset(how.size || twemoji.size),
[529] Fix | Delete
className: how.className || twemoji.className,
[530] Fix | Delete
onerror: how.onerror || twemoji.onerror
[531] Fix | Delete
});
[532] Fix | Delete
}
[533] Fix | Delete
[534] Fix | Delete
function replace(text, callback) {
[535] Fix | Delete
return String(text).replace(re, callback);
[536] Fix | Delete
}
[537] Fix | Delete
[538] Fix | Delete
function test(text) {
[539] Fix | Delete
// IE6 needs a reset before too
[540] Fix | Delete
re.lastIndex = 0;
[541] Fix | Delete
var result = re.test(text);
[542] Fix | Delete
re.lastIndex = 0;
[543] Fix | Delete
return result;
[544] Fix | Delete
}
[545] Fix | Delete
[546] Fix | Delete
function toCodePoint(unicodeSurrogates, sep) {
[547] Fix | Delete
var
[548] Fix | Delete
r = [],
[549] Fix | Delete
c = 0,
[550] Fix | Delete
p = 0,
[551] Fix | Delete
i = 0;
[552] Fix | Delete
while (i < unicodeSurrogates.length) {
[553] Fix | Delete
c = unicodeSurrogates.charCodeAt(i++);
[554] Fix | Delete
if (p) {
[555] Fix | Delete
r.push((0x10000 + ((p - 0xD800) << 10) + (c - 0xDC00)).toString(16));
[556] Fix | Delete
p = 0;
[557] Fix | Delete
} else if (0xD800 <= c && c <= 0xDBFF) {
[558] Fix | Delete
p = c;
[559] Fix | Delete
} else {
[560] Fix | Delete
r.push(c.toString(16));
[561] Fix | Delete
}
[562] Fix | Delete
}
[563] Fix | Delete
return r.join(sep || '-');
[564] Fix | Delete
}
[565] Fix | Delete
[566] Fix | Delete
}());
[567] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function