From 59f5e12b63e793978d37618bd5c8c2baa911bcf5 Mon Sep 17 00:00:00 2001 From: Dang Huynh Date: Tue, 18 Sep 2018 10:55:49 +0800 Subject: [PATCH] Fix medium site detection --- MMRA.safariextension/content.js | 2 +- content.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MMRA.safariextension/content.js b/MMRA.safariextension/content.js index d79668b..ab8ac92 100644 --- a/MMRA.safariextension/content.js +++ b/MMRA.safariextension/content.js @@ -87,9 +87,9 @@ var config = {attributes: true}; // This extension runs on all domains so it can Make Medium Readable Again even for publications on custom domains. // Here we make sure the code only runs on Medium sites. -if (document.querySelector('head meta[property="al:ios:app_name"][content="medium" i]')) { makeReadable(); shrinkHeaderImages(); +if (document.querySelector('head[prefix*="medium-com:"]')) { chrome.storage.sync.get(null, function(items) { if (items.hideDickbar) { diff --git a/content.js b/content.js index d79668b..ab8ac92 100644 --- a/content.js +++ b/content.js @@ -87,9 +87,9 @@ var config = {attributes: true}; // This extension runs on all domains so it can Make Medium Readable Again even for publications on custom domains. // Here we make sure the code only runs on Medium sites. -if (document.querySelector('head meta[property="al:ios:app_name"][content="medium" i]')) { makeReadable(); shrinkHeaderImages(); +if (document.querySelector('head[prefix*="medium-com:"]')) { chrome.storage.sync.get(null, function(items) { if (items.hideDickbar) {