From f6ed225bad445723a724e38a2d93fb5c822ed5df Mon Sep 17 00:00:00 2001 From: Sampson Date: Sun, 9 Aug 2020 18:07:47 -0500 Subject: [PATCH 1/3] Updates selectors to match changes to site --- data/SpeedReaderConfig.json | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) diff --git a/data/SpeedReaderConfig.json b/data/SpeedReaderConfig.json index 6e90283..4bb10cf 100644 --- a/data/SpeedReaderConfig.json +++ b/data/SpeedReaderConfig.json @@ -312,33 +312,25 @@ ], "declarative_rewrite": { "main_content": [ - "article header", - ".content__article-body" + "a[data-component=series]", + "a[data-component=section]", + "[data-component=meta-byline]", + "div[role=textbox]", + "h1", + "a[rel=author]", + "picture", + "#the-caption figcaption", + "main .article-body-commercial-selector", + "aside", + "p" ], "main_content_cleanup": [ - ".hide-on-mobile", - ".inline-icon", - ".atom__button", - "input", - ".meta__extras", - ".content__headline-showcase-wrapper", - ".fc-container__header", - "figure.element-embed", - ".vjs-control-text" + "aside > span" ], "delazify": true, "fix_embeds": true, - "content_script": "", - "preprocess": [ - { - "selector": ".vjs-big-play-button[style]", - "attribute": [ - "style", - "data-src-background" - ], - "element_name": "img" - } - ] + "content_script": "", + "preprocess": [] } }, { From a3e2c3bb10d1629d4f247bcb437cdc0eaf213f53 Mon Sep 17 00:00:00 2001 From: AndriusA Date: Mon, 10 Aug 2020 12:31:39 +0300 Subject: [PATCH 2/3] updates theguardian.com content selectors --- data/SpeedReaderConfig.json | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/data/SpeedReaderConfig.json b/data/SpeedReaderConfig.json index 6e90283..217d652 100644 --- a/data/SpeedReaderConfig.json +++ b/data/SpeedReaderConfig.json @@ -321,14 +321,18 @@ ".atom__button", "input", ".meta__extras", + ".meta__contact-method", + ".meta__image", ".content__headline-showcase-wrapper", ".fc-container__header", "figure.element-embed", - ".vjs-control-text" + ".vjs-control-text", + "aside > span", + ".submeta__share" ], "delazify": true, "fix_embeds": true, - "content_script": "", + "content_script": "", "preprocess": [ { "selector": ".vjs-big-play-button[style]", @@ -337,6 +341,10 @@ "data-src-background" ], "element_name": "img" + }, + { + "selector": "a.js-gallerythumbs", + "element_name": "div" } ] } From 2f33160777c44511063e1e8323a73ee9d354d772 Mon Sep 17 00:00:00 2001 From: AndriusA Date: Mon, 10 Aug 2020 13:04:29 +0300 Subject: [PATCH 3/3] more tweaking to theguardian selectors to support partial markup changes --- data/SpeedReaderConfig.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/data/SpeedReaderConfig.json b/data/SpeedReaderConfig.json index 1562e68..035b63a 100644 --- a/data/SpeedReaderConfig.json +++ b/data/SpeedReaderConfig.json @@ -320,10 +320,9 @@ "div[role=textbox]", "h1", "a[rel=author]", - "picture", + "article picture", "#the-caption figcaption", "main .article-body-commercial-selector", - "aside", "p" ], "main_content_cleanup": [