From de3c8d38830957245b5ed5fce06c1b8283bd71a7 Mon Sep 17 00:00:00 2001 From: Dan Berman Date: Mon, 4 Sep 2017 15:12:33 -0700 Subject: [PATCH] rename makeViewable to shrinkHeaderImages and make default --- content.js | 7 ++----- options.html | 8 ++++---- options.js | 5 +---- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/content.js b/content.js index d29c319..c96e510 100644 --- a/content.js +++ b/content.js @@ -38,7 +38,7 @@ var disableLazyLoading = function() { } }; -var makeViewable = function() { +var shrinkHeaderImages = function() { var ridiculousHeaderImage = document.querySelector('figure.graf--layoutFillWidth'); if (ridiculousHeaderImage != null) { ridiculousHeaderImage.style.maxWidth = '700px'; @@ -57,6 +57,7 @@ var config = {attributes: true}; var metaCheck = document.head.querySelector('meta[property="al:ios:app_name"]'); if (metaCheck != null && metaCheck.content == "Medium") { makeReadable(); + shrinkHeaderImages(); chrome.storage.sync.get(null, function(items) { if (items.hideDickbar) { @@ -65,10 +66,6 @@ if (metaCheck != null && metaCheck.content == "Medium") { if (items.disableLazyImages) { disableLazyLoading(); } - - if (items.makeViewable) { - makeViewable(); - } }); observer.observe(document.querySelector('body'), config); diff --git a/options.html b/options.html index acd40e2..762671a 100644 --- a/options.html +++ b/options.html @@ -25,10 +25,6 @@ Disable lazy image loading - -

Defaults

@@ -41,6 +37,10 @@ Hide bottom Get Updates bar + +

diff --git a/options.js b/options.js index 39cfb8e..6d9a95e 100644 --- a/options.js +++ b/options.js @@ -2,11 +2,9 @@ function save_options() { var hideDickbar = document.getElementById('dickbar').checked; var disableLazyImages = document.getElementById('images').checked; - var makeViewable = document.getElementById('ridiculousHeader').checked; chrome.storage.sync.set({ hideDickbar: hideDickbar, - disableLazyImages: disableLazyImages, - makeViewable: makeViewable + disableLazyImages: disableLazyImages }, function() { // Update status to let user know options were saved. var status = document.getElementById('status'); @@ -26,7 +24,6 @@ function restore_options() { }, function(items) { document.getElementById('dickbar').checked = items.hideDickbar; document.getElementById('images').checked = items.disableLazyImages; - document.getElementById('makeViewable').checked = items.makeViewable; }); } document.addEventListener('DOMContentLoaded', restore_options);