Modals are no longer needed

master
Hauke D 7 years ago
parent 93b73c04db
commit 32fafd2669

@ -45,7 +45,7 @@ iframe.perleditor {
<iframe name="perlrunner" sandbox="allow-scripts" src="perlrunner.html" style="display:none;"></iframe>
<iframe id="perl1" sandbox="allow-scripts allow-modals" class="perleditor" style="height:10em;"></iframe>
<iframe id="perl1" sandbox="allow-scripts" class="perleditor" style="height:10em;"></iframe>
<script>
document.getElementById('perl1').src =
"perleditor.html#" + encodeURIComponent(JSON.stringify( {
@ -53,7 +53,7 @@ document.getElementById('perl1').src =
} ));
</script>
<iframe id="perl2" sandbox="allow-scripts allow-modals" class="perleditor" style="height:40em;"></iframe>
<iframe id="perl2" sandbox="allow-scripts" class="perleditor" style="height:40em;"></iframe>
<script>
document.getElementById('perl2').src =
"perleditor.html#" + encodeURIComponent(JSON.stringify( {

@ -92,18 +92,15 @@ function findPerlRunner () {
pollId = window.setInterval( function () {
if (perlRunner)
window.clearInterval(pollId);
else if ( Date.now()>pollUntil ) {
//TODO: alternative to confirm() if modals are not allowed
if (window.confirm("Perl does not appear to have loaded yet, keep waiting?\n"
+"(If you are on a slow connection, click OK to keep waiting.)"))
pollUntil = Date.now() + 10*1000;
else
window.clearInterval(pollId);
}
else
else {
if (window.parent && window.parent.frames["perlrunner"])
window.parent.frames["perlrunner"].postMessage(
{perlRunnerDiscovery:1}, '*');
if ( Date.now()>pollUntil ) {
$('#runnererrors>pre').text("Perl does not appear to have loaded yet, still waiting...");
$('#runnererrors').show();
}
}
}, 100);
}

Loading…
Cancel
Save