-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathemoji.js
27 lines (25 loc) · 938 Bytes
/
emoji.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function addEmoji(emoji) {
let inputEle = document.getElementById('content');
input.value += emoji;
}
function toggleEmojiDrawer() {
let drawer = document.getElementById('drawer');
if (drawer.classList.contains('hidden')) {
drawer.classList.remove('hidden')
} else {
drawer.classList.add('hidden')
}
}
function toggle_class(categorie) {
var otog = document.getElementById(categorie)
var htog = document.getElementById("emoji-" + categorie + "-toggle")
var otogg = document.getElementsByClassName("emoji-drawer-class-active")[0]
var htogg = document.getElementsByClassName("emoji-active-toggle")[0]
try {
otogg.setAttribute("class","emoji-drawer-class")
htogg.setAttribute("class","emoji-normal-toggle")
} catch {}
otog.setAttribute("class","emoji-drawer-class-active")
htog.setAttribute("class","emoji-active-toggle")
}
toggleEmojiDrawer()