Commit 227fde4b authored by Kannan V M's avatar Kannan V M
Browse files

add mod html

parent 12f2888a
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>Document</title>
</head>
<body>
<ul id="listid">
</ul>
<script src="socket.io.js"></script>
<script>
const mod = io.connect('/mod');
mod.on('leaves data', (leavesdata) => {
var text = {};
var x;
document.getElementById("listid").innerHTML = '';
for (x in leavesdata) {
document.getElementById("listid").innerHTML += '<li>'+leavesdata[x]["leaftext"]+'<button onclick="contentRemove('+"'"+x+"'"+')">Remove</button></li>';
};
});
function contentRemove(socketid){
mod.emit('message delete', socketid);
};
</script>
</body>
</html>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment