summaryrefslogtreecommitdiff
path: root/p/scripts
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2018-11-26 08:32:04 +0100
committerGravatar GitHub <noreply@github.com> 2018-11-26 08:32:04 +0100
commit5c8eb1e86498af03c73a0320bd3213c509e1c743 (patch)
tree9e032a5f0fcb1215e850ab2ae387e5be86424426 /p/scripts
parent01c4cd83186d3c13744b7fa97893ce83e40976f5 (diff)
Fix print for unfolded articles (#2148)
Fix https://github.com/FreshRSS/FreshRSS/issues/2130 `.current` might not exist in views for which all articles are already expanded
Diffstat (limited to 'p/scripts')
-rw-r--r--p/scripts/main.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index 3f1fdf20e..343534826 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1301,13 +1301,13 @@ function init_confirm_action() {
}
function init_print_action() {
- $('.item.share > a[href="#"]').click(function () {
+ $('.item.share > a[href="#"]').click(function (e) {
var content = "<html><head><style>" +
"body { font-family: Serif; text-align: justify; }" +
"a { color: #000; text-decoration: none; }" +
"a:after { content: ' [' attr(href) ']'}" +
"</style></head><body>" +
- $(".flux.current .content").html() +
+ $(e.target).closest('.flux_content').find('.content').html() +
"</body></html>";
var tmp_window = window.open();