Fix scroll jumping by changing connected node list to an iframe
This commit is contained in:
parent
d03620db7e
commit
7cb4731156
@ -271,8 +271,8 @@
|
||||
|
||||
<i class="fas fa-link"></i>
|
||||
Outgoing Connections:
|
||||
<div class="container connectedNodesControl">
|
||||
<pre id="connectedNodes">Unable to get nodes</pre>
|
||||
<div class="container">
|
||||
<iframe id="connectedNodesIframe" srcdoc="Unable to get nodes" scrolling="no"></iframe>
|
||||
</div>
|
||||
<br>
|
||||
<div class="field">
|
||||
|
@ -14,11 +14,6 @@
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
#connectedNodes{
|
||||
overflow-y: hidden;
|
||||
max-height: 300px;
|
||||
max-width: 300px;
|
||||
}
|
||||
|
||||
#configToggle, #configContent{
|
||||
margin-left: 1em;
|
||||
@ -60,4 +55,8 @@
|
||||
|
||||
.torTransportField {
|
||||
margin-top: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
#connectedNodesIframe{
|
||||
overflow: hidden;
|
||||
}
|
@ -96,12 +96,11 @@ var getStats = function(){
|
||||
.then(function(stats) {
|
||||
uptimeDisplay.innerText = seconds2time(stats['uptime'])
|
||||
connectedNodes = stats['connectedNodes'].split('\n')
|
||||
connectedDisplay.innerText = ''
|
||||
document.getElementById('connectedNodesIframe').srcdoc = '<pre>'
|
||||
for (x = 0; x < connectedNodes.length; x++){
|
||||
if (! connectedDisplay.innerText.includes(connectedNodes[x])){
|
||||
connectedDisplay.innerText += '🧅 ' + connectedNodes[x] + '\n'
|
||||
}
|
||||
document.getElementById('connectedNodesIframe').srcdoc += '🧅 ' + connectedNodes[x] + '\n'
|
||||
}
|
||||
document.getElementById('connectedNodesIframe').srcdoc += '</pre>'
|
||||
storedBlockDisplay.innerText = stats['blockCount']
|
||||
queuedBlockDisplay.innerText = stats['blockQueueCount']
|
||||
document.getElementById('threads').innerText = stats['threads']
|
||||
|
@ -190,4 +190,4 @@ body{
|
||||
|
||||
.hidden{
|
||||
display: none;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user