From 1d2abcef600f441f18f5c9313567fffd0e54873c Mon Sep 17 00:00:00 2001 From: shinigami-eyes <43276258+shinigami-eyes@users.noreply.github.com> Date: Sun, 16 Dec 2018 16:42:59 +0100 Subject: [PATCH] Fixed tumblr and medium snippets --- extension/content.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extension/content.js b/extension/content.js index 2350af8..0cc791b 100644 --- a/extension/content.js +++ b/extension/content.js @@ -456,9 +456,9 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => { if (hostname == 'reddit.com' && (classList.contains('scrollerItem') || classList.contains('thing') || classList.contains('Comment'))) return node; if (hostname == 'twitter.com' && (classList.contains('stream-item'))) return node; if (hostname == 'disqus.com' && (classList.contains('post-content'))) return node; - if (hostname == 'medium.com' && (classList.contains('streamItemConversationItem'))) return node; + if (hostname == 'medium.com' && (classList.contains('streamItem') || classList.contains('streamItemConversationItem'))) return node; if (hostname == 'youtube.com' && node.tagName == 'YTD-COMMENT-RENDERER') return node; - if (hostname.endsWith('tumblr.com') && classList.contains('post')) return node; + if (hostname.endsWith('tumblr.com') && (node.dataset.postId || classList.contains('post'))) return node; node = node.parentElement; }