From: Calin Crisan Date: Sun, 24 Aug 2014 17:16:58 +0000 (+0300) Subject: added a special /version/ uri X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=fb52b583dc4ef66f1383f1650d1173afd2990cfa;p=motioneye-debian added a special /version/ uri --- diff --git a/static/js/version.js b/static/js/version.js new file mode 100644 index 0000000..7d43298 --- /dev/null +++ b/static/js/version.js @@ -0,0 +1,6 @@ + +$(window).load(function () { + if (window.parent && window.parent.postMessage) { + window.parent.postMessage({'hostname': hostname, 'version': version, 'url': window.location.href.replace('version/', '')}, '*'); + } +}); diff --git a/templates/version.html b/templates/version.html new file mode 100644 index 0000000..3c7a8f8 --- /dev/null +++ b/templates/version.html @@ -0,0 +1,15 @@ +{% extends "base.html" %} + +{% block script %} + {{super()}} + + +{% endblock %} + +{% block body %} +hostname = "{{hostname}}"
+version = "{{version}}" +{% endblock %}