summaryrefslogtreecommitdiff
path: root/tt-rss.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2005-09-05 10:09:10 +0100
committerAndrew Dolgov <[email protected]>2005-09-05 10:09:10 +0100
commit70830c87c950e9c7b4267372acaedd8d0f9b7d58 (patch)
treea26089c42e0bad6154ab6180937ab71d21585716 /tt-rss.js
parent7e63d5e429d107234457689552c18e233baae286 (diff)
optional support for showing content in an iframe
Diffstat (limited to 'tt-rss.js')
-rw-r--r--tt-rss.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/tt-rss.js b/tt-rss.js
index 53360f813..de262f91c 100644
--- a/tt-rss.js
+++ b/tt-rss.js
@@ -423,11 +423,16 @@ function view(id,feed_id) {
active_post_id = id;
- xmlhttp_view.open("GET", "backend.php?op=view&id=" + param_escape(id), true);
- xmlhttp_view.onreadystatechange=view_callback;
- xmlhttp_view.send(null);
-
+ var content = document.getElementById("content-frame");
+ if (content) {
+ content.src = "backend.php?op=view&addheader=true&id=" + param_escape(id);
+ markHeadline(active_post_id);
+ } else {
+ xmlhttp_view.open("GET", "backend.php?op=view&id=" + param_escape(id), true);
+ xmlhttp_view.onreadystatechange=view_callback;
+ xmlhttp_view.send(null);
+ }
}
function timeout() {
@@ -615,4 +620,6 @@ function init() {
updateFeedList(false, false);
document.onkeydown = hotkey_handler;
setTimeout("timeout()", 1800*1000);
+
+ var content = document.getElementById("content");
}