mirror of
https://github.com/darverdevs/BetterMultiPort.git
synced 2024-12-21 22:54:11 -08:00
useless
This commit is contained in:
parent
9ff5e6b042
commit
50acfeafda
|
@ -1,33 +0,0 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>query test</title>
|
||||
<script type="text/javascript">
|
||||
window.addEventListener("load", () => {
|
||||
const output = document.getElementById("out");
|
||||
document.getElementById("testButton").addEventListener("click", () => {
|
||||
const ws = new WebSocket(document.getElementById("uriField").value);
|
||||
ws.onopen = (e) => {
|
||||
output.innerText = "please wait";
|
||||
ws.send(document.getElementById("acceptField").value);
|
||||
};
|
||||
ws.onmessage = (e) => {
|
||||
try {
|
||||
output.innerText += JSON.stringify(JSON.parse(e.data), null, 4);
|
||||
}catch(ee) {
|
||||
output.innerText += e.data;
|
||||
}
|
||||
};
|
||||
ws.onclose = (e) => {
|
||||
output.innerText = output.innerText + "\n\nSocket Closed.";
|
||||
};
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-family:sans-serif;">
|
||||
<input type="text" id="uriField" value="ws://127.0.0.1:25565/" /><br />
|
||||
<input type="text" id="acceptField" value="accept: motd" /><br />
|
||||
<button id="testButton">send</button>
|
||||
<pre id="out" style="font-family:sans-serif;"></pre>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user