Template:CodeTest: Difference between revisions
Template page
(Created page with "<html> <style type="text/css"> .codeTestWindow{border:0px; width:100%; height:400px; border-radius:10px;} </style> <script> window.addEventListener( "message", (event) => { var iframes = document.getElementsByTagName('IFRAME'); let frame = undefined; for (var i = 0, iframe, win; i < iframes.length; i++) { iframe = iframes[i]; win = iframe.contentWindow || iframe.contentDocument.defaultView; if (win === e...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
</style> | </style> | ||
<script> | <script> | ||
if(window.CodeTestSupportScriptsLoaded === undefined){ | |||
window.addEventListener( | window.addEventListener( | ||
"message", | "message", | ||
Line 20: | Line 21: | ||
if(event.data==="expand"){ | if(event.data==="expand"){ | ||
frame.style = "position: fixed;inset: 0px;height: 100vh;width: 100vw;z-index:1000000;border: 0px;" | frame.style = "position: fixed;inset: 0px;height: 100vh;width: 100vw;z-index:1000000;border: 0px;" | ||
} | } | ||
if(event.data==="contract"){ | |||
frame.style = ""; | frame.style = ""; | ||
} | } | ||
Line 26: | Line 28: | ||
false, | false, | ||
); | ); | ||
} | |||
window.CodeTestSupportScriptsLoaded = true; | |||
</script> | </script> | ||
</html> | </html> |
Latest revision as of 17:09, 21 January 2025