openArticleInNewWindow: add workaround for popup blockers
This commit is contained in:
parent
93ec185bb7
commit
04e91733a7
2 changed files with 13 additions and 5 deletions
16
functions.js
16
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);
|
||||
debug(query + " " + wname);
|
||||
|
||||
var w = window.open("", wname);
|
||||
|
||||
if (!w) notify_error("Failed to open window for the article");
|
||||
|
||||
new Ajax.Request(query, {
|
||||
onComplete: function(transport) {
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<tr><td class='n'>shift-S</td><td><?php echo __("Toggle published") ?></td></tr>
|
||||
<tr><td class='n'>u</td><td><?php echo __("Toggle unread") ?></td></tr>
|
||||
<tr><td class='n'>t</td><td><?php echo __("Edit tags") ?></td></tr>
|
||||
<!-- <tr><td class='n'>S</td><td>Edit score</td></tr> -->
|
||||
<tr><td class='n'>o</td><td><?php echo __("Open article in new window") ?></td></tr>
|
||||
</table>
|
||||
|
||||
<h2><?php echo __("Other actions") ?></h2>
|
||||
|
|
Loading…
Reference in a new issue