summaryrefslogtreecommitdiff
path: root/functions.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2008-05-16 08:42:30 +0100
committerAndrew Dolgov <[email protected]>2008-05-16 08:42:30 +0100
commit04e91733a76a70d193559cfda17e9d8072fe20a0 (patch)
tree8bdec0125999aed1e06acb33dc15d87db1a3ac00 /functions.js
parent93ec185bb74fe0aebd72da41e128f597be1f342a (diff)
openArticleInNewWindow: add workaround for popup blockers
Diffstat (limited to 'functions.js')
-rw-r--r--functions.js16
1 files changed, 12 insertions, 4 deletions
diff --git a/functions.js b/functions.js
index e309c5e70..f46bc60f0 100644
--- a/functions.js
+++ b/functions.js
@@ -75,10 +75,13 @@ function open_article_callback(transport) {
debug("open_article_callback, received link: " + link);
- if (link) {
- debug("link url: " + link.firstChild.nodeValue);
+ if (link && id) {
- var w = window.open(link.firstChild.nodeValue, "_blank");
+ var wname = "ttrss_article_" + id.firstChild.nodeValue;
+
+ debug("link url: " + link.firstChild.nodeValue + ", wname " + wname);
+
+ var w = window.open(link.firstChild.nodeValue, wname);
if (!w) { notify_error("Failed to load article in new window"); }
@@ -1502,8 +1505,13 @@ function openArticleInNewWindow(id) {
debug("openArticleInNewWindow: " + id);
var query = "backend.php?op=rpc&subop=getArticleLink&id=" + id;
+ var wname = "ttrss_article_" + id;
+
+ debug(query + " " + wname);
+
+ var w = window.open("", wname);
- debug(query);
+ if (!w) notify_error("Failed to open window for the article");
new Ajax.Request(query, {
onComplete: function(transport) {