Skip to content
Snippets Groups Projects
Commit 227fde4b authored by Kannan V M's avatar Kannan V M
Browse files

add mod html

parent 12f2888a
Branches
1 merge request!2Back-end
mod.html 0 → 100644
<!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>
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