[epiphany] PDF: Do not run reader mode for pages in document mode



commit 802da8aaedd1ae4cc6a4c9122043556647806632
Author: Jan-Michael Brummer <jan brummer tabos org>
Date:   Fri Jan 18 17:48:40 2019 +0100

    PDF: Do not run reader mode for pages in document mode

 embed/ephy-web-view.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 5b3b10f00..ae9b2a2dc 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -1053,9 +1053,10 @@ static gboolean
 run_readability_js_if_needed (gpointer data)
 {
   EphyWebView *web_view = data;
+  EphyEmbed *embed = EPHY_GET_EMBED_FROM_EPHY_WEB_VIEW (web_view);
 
-  /* Internal pages should never receive reader mode. */
-  if (!ephy_embed_utils_is_no_show_address (web_view->address)) {
+  /* Internal pages and document mode should never receive reader mode. */
+  if (!ephy_embed_utils_is_no_show_address (web_view->address) && ephy_embed_get_mode (embed) != 
EPHY_EMBED_MODE_EVINCE_DOCUMENT) {
     webkit_web_view_run_javascript_from_gresource (WEBKIT_WEB_VIEW (web_view),
                                                    "/org/gnome/epiphany/readability.js",
                                                    NULL,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]