From 5f942cc1c9801eef440cd1e85e36b03c05aaa8c5 Mon Sep 17 00:00:00 2001 From: Alexis Degrugillier Date: Fri, 2 Jun 2017 22:53:13 +0200 Subject: [PATCH] Add support for a new shortcut in reader view Now you can open the original page in the reader view with the same shortcut you'll use in the normal view. I've changed how we identify the link to make it more flexible. The previous way was too restrictive since the selector used a really strict path to get the url. There was another way to achieve the same thing without changing the selector. It was quite ugly since some meaningless class would be added on the markup to match the selector query. See #1400 --- app/views/index/normal.phtml | 2 +- app/views/index/reader.phtml | 2 +- p/scripts/main.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/index/normal.phtml b/app/views/index/normal.phtml index 6fda11ed9..ba48b2501 100644 --- a/app/views/index/normal.phtml +++ b/app/views/index/normal.phtml @@ -66,7 +66,7 @@ if (!empty($this->entries)) { ?>
-

entry->title(); ?>

+

entry->title(); ?>

entry->author(); echo $author != '' ? '
' . _t('gen.short.by_author', $author) . '
' : '', diff --git a/app/views/index/reader.phtml b/app/views/index/reader.phtml index a19ee322e..f2af75af0 100644 --- a/app/views/index/reader.phtml +++ b/app/views/index/reader.phtml @@ -19,7 +19,7 @@ if (!empty($this->entries)) { $feed = FreshRSS_CategoryDAO::findFeed($this->categories, $item->feed()); //We most likely already have the feed object in cache if (empty($feed)) $feed = $item->feed(true); ?> - + ✇ name(); ?>

title(); ?>

diff --git a/p/scripts/main.js b/p/scripts/main.js index f01af20ff..78a3772f6 100644 --- a/p/scripts/main.js +++ b/p/scripts/main.js @@ -661,7 +661,7 @@ function init_shortcuts() { }); shortcut.add(shortcuts.go_website, function () { - var url_website = $('.flux.current > .flux_header > .title > a').attr("href"); + var url_website = $('.flux.current a.go_website').attr("href"); if (context.auto_mark_site) { $(".flux.current").each(function () {