|
@ -17,7 +17,7 @@ |
|
|
<div class="col-6 col-sm-4 a-r"> |
|
|
<div class="col-6 col-sm-4 a-r"> |
|
|
<input type="button" value="clear" class="btn" id="clear"/> |
|
|
<input type="button" value="clear" class="btn" id="clear"/> |
|
|
<input type="button" value="autoscroll" class="btn" id="scroll"/> |
|
|
<input type="button" value="autoscroll" class="btn" id="scroll"/> |
|
|
<!--<input type="button" value="copy" class="btn" id="copy"/>--> |
|
|
<input type="button" value="copy" class="btn" id="copy"/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -64,12 +64,25 @@ |
|
|
mAutoScroll = !mAutoScroll; |
|
|
mAutoScroll = !mAutoScroll; |
|
|
this.value = (mAutoScroll) ? "autoscroll" : "manual scroll"; |
|
|
this.value = (mAutoScroll) ? "autoscroll" : "manual scroll"; |
|
|
}); |
|
|
}); |
|
|
/*document.getElementById("copy").addEventListener("click", function() { |
|
|
document.getElementById("copy").addEventListener("click", function() { |
|
|
con.select(); |
|
|
if (window.clipboardData && window.clipboardData.setData) { |
|
|
con.setSelectionRange(0, 9999999); |
|
|
return window.clipboardData.setData("Text", text); |
|
|
navigator.clipboard.writeText(con.value); |
|
|
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { |
|
|
|
|
|
var ta = document.createElement("textarea"); |
|
|
|
|
|
ta.textContent = con.value; |
|
|
|
|
|
ta.style.position = "fixed"; // Prevent scrolling to bottom of page in Microsoft Edge. |
|
|
|
|
|
document.body.appendChild(ta); |
|
|
|
|
|
ta.select(); |
|
|
|
|
|
try { |
|
|
|
|
|
return document.execCommand("copy"); // Security exception may be thrown by some browsers. |
|
|
|
|
|
} catch (ex) { |
|
|
|
|
|
alert("Copy to clipboard failed" + ex); |
|
|
|
|
|
} finally { |
|
|
|
|
|
document.body.removeChild(ta); |
|
|
alert("Copied to clipboard"); |
|
|
alert("Copied to clipboard"); |
|
|
});*/ |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if (!!window.EventSource) { |
|
|
if (!!window.EventSource) { |
|
|
var source = new EventSource('/events'); |
|
|
var source = new EventSource('/events'); |
|
|