Work around etherpad focus grabbing.

This commit is contained in:
2021-03-07 21:36:13 +01:00
parent ba8245bfe4
commit 7243fbb705
2 changed files with 10 additions and 3 deletions
+9 -2
View File
@@ -41,8 +41,15 @@ document.addEventListener("DOMContentLoaded", function() {
localStorage.setItem("theme", "light");
}
});
// this doesn't really work to prevent focus grabbing by etherpad.
document.getElementById("mini-cli").focus();
// icky but I'm not above this.
// this is to work around etherpad grabbing focus.
var element = document.getElementById("mini-cli");
setTimeout( function() { element.focus() }, 1000 );
setTimeout( function() { element.focus() }, 2000 );
setTimeout( function() { element.focus() }, 3000 );
setTimeout( function() { element.focus() }, 4000 );
setTimeout( function() { element.focus() }, 5000 );
});
function processSettings(args){
+1 -1
View File
@@ -18,7 +18,7 @@
<span class="stoa-header">Stoa for [[{{node.uri}}]] ↓</span><br />
<div class="stoa-public">
<span class="subnode-header">from <a href="https://stoa.anagora.org/p/{{node.uri}}">stoa.anagora.org/p/{{node.uri}}</a></span><br />
<iframe name="embed_readwrite" src="https://stoa.anagora.org/p/{{node.uri}}?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false" width="100%" height="600" frameborder="0"></iframe>
<iframe name="embed_readwrite" src="https://stoa.anagora.org/p/{{node.uri}}?showControls=true&showChat=true&showLineNumbers=true&useMonospaceFont=false" width="100%" height="800" frameborder="0"></iframe>
</div>
</div>
</div>