Add eggs, as well as example egg and config
This commit is contained in:
21
server/eggs/notepad/index.js
Normal file
21
server/eggs/notepad/index.js
Normal file
@@ -0,0 +1,21 @@
|
||||
function eggNotepad() {
|
||||
const eggsList = document.getElementById("eggs-list");
|
||||
eggsList.style.display = "none";
|
||||
const eggNotepad = document.getElementById("egg-notepad");
|
||||
eggNotepad.style.display = "block";
|
||||
const eggNotepadTextArea = document.getElementById("egg-notepad-textarea");
|
||||
eggNotepadTextArea.addEventListener('input', function(event) {
|
||||
const eggNotepadMessage = {
|
||||
"type": "egg-notepad",
|
||||
"username": username,
|
||||
"token": md5(password),
|
||||
"content": event.target.value
|
||||
};
|
||||
ws.send(JSON.stringify(eggNotepadMessage));
|
||||
}, false);
|
||||
}
|
||||
|
||||
function closeEggNotepad() {
|
||||
const eggNotepad = document.getElementById("egg-notepad");
|
||||
eggNotepad.style.display = "none";
|
||||
}
|
||||
Reference in New Issue
Block a user