diff options
Diffstat (limited to 'data/extensions/https-everywhere@eff.org/pages/popup')
3 files changed, 22 insertions, 38 deletions
diff --git a/data/extensions/https-everywhere@eff.org/pages/popup/index.html b/data/extensions/https-everywhere@eff.org/pages/popup/index.html index 9116280..d9441f2 100644 --- a/data/extensions/https-everywhere@eff.org/pages/popup/index.html +++ b/data/extensions/https-everywhere@eff.org/pages/popup/index.html @@ -88,12 +88,11 @@ <h3 data-i18n="chrome_experimental_rules"></h3> <h2 class="description" data-i18n="chrome_experimental_rules_description"></h2> </section> - - <section id="resetButton" class="options"> - <a href="javascript:void 0" id="reset-to-defaults" class="button" data-i18n="prefs_reset_defaults"></a> - </section> </div> + </section> + <section id="resetButton" class="options"> + <a href="javascript:void 0" id="reset-to-defaults" class="button" data-i18n="prefs_reset_defaults"></a> </section> <footer> diff --git a/data/extensions/https-everywhere@eff.org/pages/popup/style.css b/data/extensions/https-everywhere@eff.org/pages/popup/style.css index 38a35ac..304f2f8 100644 --- a/data/extensions/https-everywhere@eff.org/pages/popup/style.css +++ b/data/extensions/https-everywhere@eff.org/pages/popup/style.css @@ -1,18 +1,11 @@ -:root { - --https-blue: #0a84ff; - --darker-blue: #0060df; - --text-main: #000; - --text-secondary: #464646; - --light-grey: #ececec; - --space: 5px; -} +@import "../main.css"; body { color: var(--text-secondary); font-family: 'Lucida Grande', 'Segoe UI', Tahoma, 'DejaVu Sans', Arial, sans-serif; margin: 0; max-width: 400px; - min-width: 380px; + min-width: 360px; } header { @@ -80,23 +73,6 @@ footer a.button { border-bottom: var(--light-grey) solid 1px; } -.button { - border: var(--https-blue) solid 1px; - color: var(--text-main); - display: block; - font-size: 12px; - font-weight: bold; - margin: var(--space) auto; - padding: 10px; - text-align: center; - text-decoration: none; -} - -.button:hover { - background-color: var(--darker-blue); - color: #fff -} - .see_more__prompt { color: var(--text-main); cursor: pointer; @@ -306,6 +282,15 @@ input:checked+label:after { display: block; } +#resetButton { + display: inline-flex; + margin: 10px; + width: 95%; +} +#reset-to-defaults { + width: 100%; +} + /* Initially hide section (until rules get added). */ section.rules { display: none; diff --git a/data/extensions/https-everywhere@eff.org/pages/popup/ux.js b/data/extensions/https-everywhere@eff.org/pages/popup/ux.js index 48de5b1..f38f225 100644 --- a/data/extensions/https-everywhere@eff.org/pages/popup/ux.js +++ b/data/extensions/https-everywhere@eff.org/pages/popup/ux.js @@ -153,7 +153,7 @@ function updateEnabledDisabledUI() { e('disableButton').style.visibility = "visible"; // Hide or show the rules sections if (item.globalEnabled) { - document.body.className = "" + document.body.className = ""; e('onoffswitch_label').innerText = chrome.i18n.getMessage("menu_globalEnable"); showHttpNowhereUI(); } else { @@ -172,7 +172,7 @@ function toggleEnabledDisabled() { chrome.tabs.reload(); window.close(); }, 1500); - } + }; getOption_('globalEnabled', true, function(item) { setOption_('globalEnabled', !item.globalEnabled, extension_toggle_effect); @@ -253,9 +253,9 @@ document.addEventListener("DOMContentLoaded", function () { timestamp_span.className = "rulesets-version"; timestamp_span.innerText = `${chrome.i18n.getMessage("about_rulesets_version")} ${update_channel_name}: ${ruleset_version_string}`; this.appendChild(timestamp_span); - } + }; - sendMessage("get_ruleset_timestamps", null, timestamps => { + sendMessage("get_update_channel_timestamps", null, timestamps => { let replaces = timestamps.some(([update_channel, timestamp]) => update_channel.replaces_default_rulesets && timestamp > 0 ); @@ -408,10 +408,10 @@ function getTab(callback) { // to open in regular tab even if the popup is opened in incognito mode. document.addEventListener('click', e => { - const { target } = e + const { target } = e; if (target.matches('a[target="_blank"]')) { - chrome.tabs.create({ url: target.href }) - e.preventDefault() + chrome.tabs.create({ url: target.href }); + e.preventDefault(); } -}) +}); |