Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switching to a more dynamic system of iFrame resizing for openshot.org
- Loading branch information
Showing
2 changed files
with
5 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,11 @@ | ||
{% extends "!layout.html" %} | ||
{% set css_files = css_files + ["_static/tablefix.css"] %} | ||
{%- block footer %} | ||
<script src="//cdn.openshot.org/static/vendor/iframeSizer/iframeResizer.contentWindow.min.js"></script> | ||
This comment has been minimized.
Sorry, something went wrong. |
||
<script> | ||
$( document ).ready(function() { | ||
console.log( "OpenShot Documentation page ready" ); | ||
const height = document.body.scrollHeight; | ||
const href = location.href; | ||
if (window.parent) { | ||
location.href.includes('index.html') | ||
window.parent.postMessage( | ||
{height, href} | ||
); | ||
} | ||
}); | ||
|
||
<!-- Adds target=_blank to external links --> | ||
$(document).ready(function () { | ||
$('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr('target', '_blank'); | ||
<!-- Adds target=_blank to external links --> | ||
$('a[href^="http://"], a[href^="https://"]').not('a[class*=internal]').attr('target', '_blank'); | ||
}); | ||
</script> | ||
{% endblock %} |
Hitting external resources is bad for documentation which might be used offline.