-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs_scripts.html
22 lines (19 loc) · 991 Bytes
/
js_scripts.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
function resizeIframes() {
var iframes = document.getElementsByClassName('plotlyFrame');
Array.from(iframes).forEach(function(iframe) {
// Set the dimensions relative to parent or custom logic
iframe.style.height = window.innerHeight * 1.4 + 'px'; // 100% of the viewport height
iframe.style.width = window.innerWidth * 1 + 'px'; // 110% of the viewport width
});
}
// Resize iframes when the window resizes
window.addEventListener('resize', resizeIframes);
// Initial resize
resizeIframes();
});
</script>
<!-- This is also a suitable place for other snippets from JavaScript, CSS, or HTML elements, in order to have them included in the header -->