1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
{% extends "!layout.html" %}
{% set css_files = css_files + ["_static/tablefix.css"] %}
{%- block footer %}
<script>
$( document ).ready(function() {
<!-- Adds target=_blank to external links -->
$('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr('target', '_blank');
});
// *** iFrame resize & scrolling support ***
// Send the current page href to the parent site (if found)
// Give up after 5 tries (for example, if viewing these pages
// by themselves, with no parent openshot.org iFrame
let messageAttempts = 0;
function trySendMessage(){
messageAttempts++;
if ('parentIFrame' in window) {
const href = window.location.href;
const type = "document-loaded";
window.parentIFrame.sendMessage({href, type});
} else {
// If not, try again in one second
if (messageAttempts < 5) {
setTimeout(trySendMessage, 250);
}
}
}
trySendMessage();
</script>
{% endblock %}
|