diff --git a/README.md b/README.md index c7206ee1..17c9364a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ A web browser extension that emulates Content Delivery Networks to improve your LocalCDN based on Decentraleyes. It includes more frameworks and more CDNs: -* **New: Font Awesome v4.7.0** :tada: :tada: :tada: +* **New: Font Awesome v4.7.0 and v5.7.2** :tada: :tada: :tada: * jQuery up to 3.4.1 * Bootstrap CSS (Delivered by StackPath, NetDNA and MaxCDN) * Bootstrap JavaScript (Delivered by StackPath, NetDNA and MaxCDN) diff --git a/icons/credits b/icons/credits index 0de4403d..90b98910 100644 --- a/icons/credits +++ b/icons/credits @@ -1,4 +1,4 @@ -disabled.svg, disable-dark.svg, disable-light.svg (edited) +disabled.svg (edited) enabled.svg (edited) settings-dark.svg, settings-light.svg (edited) https://www.svgrepo.com/vectors/web-security-fill/ diff --git a/icons/disable-dark.svg b/icons/disable-dark.svg deleted file mode 100644 index dbb20dfe..00000000 --- a/icons/disable-dark.svg +++ /dev/null @@ -1,105 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/icons/disable-light.svg b/icons/disable-light.svg deleted file mode 100644 index 380e30cf..00000000 --- a/icons/disable-light.svg +++ /dev/null @@ -1,120 +0,0 @@ - - - -image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/manifest.json b/manifest.json index b6213816..185c8cc0 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "LocalCDN (fork from Decentraleyes)", - "version": "2.1.4", + "version": "2.1.4-01", "browser_specific_settings": { "gecko": { "id": "{b86e4813-687a-43e6-ab65-0bde4ab75758}", diff --git a/pages/popup/popup.css b/pages/popup/popup.css index 13b3bca7..a5cd0fe9 100644 --- a/pages/popup/popup.css +++ b/pages/popup/popup.css @@ -176,8 +176,7 @@ footer { color: #339a6f; } -#options-button-svg, -#protection-toggle-button-svg { +#options-button-svg { background-size: cover; width: 15px; height: 15px; @@ -187,8 +186,61 @@ footer { background-image: url("../../icons/settings-dark.svg"); } -#protection-toggle-button-svg { - background-image: url("../../icons/disable-dark.svg"); +#protection-toggle { + -moz-user-select: none; + cursor: pointer; + float: right; + user-select: none; + padding: 6px 0 0 4px; +} + +.switch { + position: relative; + display: inline-block; + width: 26px; + height: 16px; +} + +.switch input { + opacity: 0; + width: 0; + height: 0; +} + +.slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #b40000; + -webkit-transition: .4s; + transition: .4s; + border-radius: 34px; +} + +.slider:before { + position: absolute; + content: ""; + height: 12px; + width: 12px; + left: 2px; + bottom: 2px; + background-color: #f9f9fa; + -webkit-transition: .3s; + transition: .3s; + border-radius: 50%; +} + +input:checked + .slider { + background-color: #6bb798; +} + +input:checked + .slider:before { + -webkit-transform: translateX(10px); + -ms-transform: translateX(10px); + transform: translateX(10px); } /** @@ -345,8 +397,16 @@ footer { background-image: url("../../icons/settings-light.svg"); } - #protection-toggle-button-svg { - background-image: url("../../icons/disable-light.svg"); + input:checked + .slider { + background-color: #6bb798; + } + + .slider { + background-color: #b54b4b; + } + + .slider:before { + background-color: #323232; } /** diff --git a/pages/popup/popup.html b/pages/popup/popup.html index 88aa6094..b10741d9 100644 --- a/pages/popup/popup.html +++ b/pages/popup/popup.html @@ -35,8 +35,11 @@
-
-
+
+
diff --git a/pages/popup/popup.js b/pages/popup/popup.js index 9adccba6..bf2647df 100644 --- a/pages/popup/popup.js +++ b/pages/popup/popup.js @@ -68,7 +68,7 @@ popup._renderDomainWhitelistPanel = function () { let websiteContextElement, protectionToggleElement, domainIndicatorElement; websiteContextElement = document.getElementById('website-context'); - protectionToggleElement = document.getElementById('protection-toggle-button'); + protectionToggleElement = document.getElementById('protection-toggle-switch'); domainIndicatorElement = document.getElementById('domain-indicator'); protectionToggleElement.setAttribute('dir', popup._scriptDirection); @@ -78,7 +78,7 @@ popup._renderDomainWhitelistPanel = function () { let enableProtectionTitle = chrome.i18n.getMessage('enableProtectionTitle'); - protectionToggleElement.setAttribute('class', 'button button-toggle'); + protectionToggleElement.checked = false; protectionToggleElement.addEventListener('click', popup._enableProtection); protectionToggleElement.setAttribute('title', enableProtectionTitle); @@ -86,7 +86,7 @@ popup._renderDomainWhitelistPanel = function () { let disableProtectionTitle = chrome.i18n.getMessage('disableProtectionTitle'); - protectionToggleElement.setAttribute('class', 'button button-toggle active'); + protectionToggleElement.checked = true; protectionToggleElement.addEventListener('click', popup._disableProtection); protectionToggleElement.setAttribute('title', disableProtectionTitle); } diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 1d1e8709..05ac11ac 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -23,9 +23,7 @@ New in LocalCDN:
Please update your uBlock/uMatrix rules @@ -42,6 +40,13 @@

History

+

2020-03-13 (v2.1.4)
+

+

2020-03-12 (v2.1.3)

  • Fixed file extensions misstakes in mappings.js