forked from mirrors/treebird
ff2aa768c9
FossilOrigin-Name: b42f9e4982e0e02f62c1d5de7e41c4fb9d35326149ebab55a853d0bd672cc45e
15 lines
408 B
JavaScript
15 lines
408 B
JavaScript
// Get emojis from file
|
|
function get_emojo_picker(callback)
|
|
{
|
|
let xhr = new XMLHttpRequest();
|
|
xhr.open("GET", "/emoji_picker");
|
|
xhr.onreadystatechange = function() {
|
|
if (this.readyState === XMLHttpRequest.DONE)
|
|
callback(this.response);
|
|
};
|
|
xhr.send();
|
|
}
|
|
|
|
get_emojo_picker((emojo_picker_str) => {
|
|
document.body.insertAdjacentHTML('beforeend', emojo_picker_str);
|
|
});
|