From 8512fa5f2506456b05f73b741aee9746a7130b2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=2E=20Sch=C3=B6nitzer?= Date: Sun, 8 Apr 2018 13:11:03 +0200 Subject: [PATCH 1/3] Add feature: disable highlight menu --- content.js | 10 ++++++++++ manifest.json | 2 +- options.html | 4 ++++ options.js | 8 ++++++-- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/content.js b/content.js index 7f2c08e..a9d807e 100644 --- a/content.js +++ b/content.js @@ -15,6 +15,13 @@ var makeReadable = function() { } }; +var hideHighlightMenu = function() { + var bar = document.querySelector('.highlightMenu'); + if (bar) { + bar.style.display = 'none'; + } +}; + var hideDickbar = function() { var dickbar = document.querySelector('.js-postShareWidget'); if (dickbar) { @@ -76,6 +83,9 @@ if (document.querySelector('head meta[property="al:ios:app_name"][content="mediu if (items.disableLazyImages) { disableLazyLoading(); } + if (items.hideHighlightMenu) { + hideHighlightMenu(); + } }); observer.observe(document.body, config); diff --git a/manifest.json b/manifest.json index c634d03..1c2d4f9 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "Make Medium Readable Again", "description": "Neutralizes annoying parts of the Medium reading experience and lets you read again.", - "version": "1.3.1", + "version": "1.4.0", "applications": { "gecko": { diff --git a/options.html b/options.html index f1ed022..95b4549 100644 --- a/options.html +++ b/options.html @@ -25,6 +25,10 @@ Disable lazy image loading + +

Default Features

diff --git a/options.js b/options.js index 6d9a95e..17fc11d 100644 --- a/options.js +++ b/options.js @@ -2,9 +2,11 @@ function save_options() { var hideDickbar = document.getElementById('dickbar').checked; var disableLazyImages = document.getElementById('images').checked; + var hideHighlightMenu = document.getElementById('highlight').checked; chrome.storage.sync.set({ hideDickbar: hideDickbar, - disableLazyImages: disableLazyImages + disableLazyImages: disableLazyImages, + hideHighlightMenu: hideHighlightMenu }, function() { // Update status to let user know options were saved. var status = document.getElementById('status'); @@ -20,10 +22,12 @@ function save_options() { function restore_options() { chrome.storage.sync.get({ hideDickbar: false, - disableLazyImages: false + disableLazyImages: false, + hideHighlightMenu: false }, function(items) { document.getElementById('dickbar').checked = items.hideDickbar; document.getElementById('images').checked = items.disableLazyImages; + document.getElementById('highlight').checked = items.hideHighlightMenu; }); } document.addEventListener('DOMContentLoaded', restore_options); From 0f40d390d7e30371448b6056848f0414f54fbeab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20F=2E=20Sch=C3=B6nitzer?= Date: Sun, 8 Apr 2018 13:15:01 +0200 Subject: [PATCH 2/3] Make savebutton have normal size --- options.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/options.html b/options.html index 95b4549..dbcc89b 100644 --- a/options.html +++ b/options.html @@ -11,6 +11,9 @@ #status { font-size: 1.1em; } + #save { + margin-right: auto; + } From 707a1fed5789bc4516e1f755a5e9c924fdeb539e Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Mon, 9 Apr 2018 08:59:20 -0400 Subject: [PATCH 3/3] Make indentation consistent --- options.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/options.js b/options.js index 17fc11d..8429aae 100644 --- a/options.js +++ b/options.js @@ -6,7 +6,7 @@ function save_options() { chrome.storage.sync.set({ hideDickbar: hideDickbar, disableLazyImages: disableLazyImages, - hideHighlightMenu: hideHighlightMenu + hideHighlightMenu: hideHighlightMenu }, function() { // Update status to let user know options were saved. var status = document.getElementById('status'); @@ -23,7 +23,7 @@ function restore_options() { chrome.storage.sync.get({ hideDickbar: false, disableLazyImages: false, - hideHighlightMenu: false + hideHighlightMenu: false }, function(items) { document.getElementById('dickbar').checked = items.hideDickbar; document.getElementById('images').checked = items.disableLazyImages;