aboutsummaryrefslogtreecommitdiffstats
path: root/view
diff options
context:
space:
mode:
Diffstat (limited to 'view')
-rw-r--r--view/js/mod_chanview.js19
-rw-r--r--view/tpl/chanview.tpl1
2 files changed, 20 insertions, 0 deletions
diff --git a/view/js/mod_chanview.js b/view/js/mod_chanview.js
new file mode 100644
index 000000000..0bf81ba35
--- /dev/null
+++ b/view/js/mod_chanview.js
@@ -0,0 +1,19 @@
+
+function resize_iframe()
+{
+ if(typeof(window.innerHeight) != 'undefined') {
+ var height=window.innerHeight;//Firefox
+ }
+ else {
+ if (typeof(document.body.clientHeight) != 'undefined')
+ {
+ var height=document.body.clientHeight;//IE
+ }
+ }
+
+ //resize the iframe according to the size of the
+ //window (all these should be on the same line)
+ document.getElementById("remote-channel").style.height=parseInt(height-document.getElementById("remote-channel").offsetTop-8)+"px";
+}
+
+window.onresize=resize_iframe;
diff --git a/view/tpl/chanview.tpl b/view/tpl/chanview.tpl
new file mode 100644
index 000000000..641294feb
--- /dev/null
+++ b/view/tpl/chanview.tpl
@@ -0,0 +1 @@
+<iframe id="remote-channel" width="100%" src="$url" onload="resize_iframe()"></iframe>