From fb52b583dc4ef66f1383f1650d1173afd2990cfa Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sun, 24 Aug 2014 20:16:58 +0300 Subject: [PATCH] added a special /version/ uri --- static/js/version.js | 6 ++++++ templates/version.html | 15 +++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 static/js/version.js create mode 100644 templates/version.html 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 %} -- 2.39.5