File: layout.html

package info (click to toggle)
openshot-qt 3.1.1%2Bdfsg1-3
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 166,304 kB
  • sloc: python: 475,634; javascript: 34,891; xml: 3,397; makefile: 218; sh: 156
file content (31 lines) | stat: -rw-r--r-- 1,067 bytes parent folder | download
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 %}