From 68ca1e4cd8856732bbfc5bcabcc11a59e4ea229e Mon Sep 17 00:00:00 2001 From: jspenguin2017 Date: Sat, 10 Feb 2018 12:56:30 -0700 Subject: [PATCH 1/7] basic styling --- src/css/popup.css | 38 ++++++++++++++++++-------------------- src/popup.html | 9 ++++++++- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/src/css/popup.css b/src/css/popup.css index ea0f7c3f30b79..fca051e2f7991 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -124,11 +124,15 @@ p { #switch .fa { color: #0046ff; cursor: pointer; - font-size: 700%; + + /* Patch 2018-02-10: Make switch button smaller */ + font-size: 600%; + margin: 0; } #switch .fa:hover { - opacity: 0.9; + /* Patch 2018-02-10: Adjust hover color */ + opacity: 0.8; } body.off #switch .fa { color: #ccc; @@ -148,6 +152,7 @@ body.off #switch .fa { color: #aaa; cursor: pointer; visibility: hidden; + /* Patch 2018-02-01: Adjust spacing for two rows basic tools */ margin-left: 1.4em; @@ -220,26 +225,19 @@ body[dir="rtl"] #extraTools > span > span.badge { color: #333; } -#refresh { - background-color: #ffe; - border: 1px solid #ddc; - border-radius: 4px; - color: #888; - cursor: pointer; - display: none; - font-size: 3.5em; - left: 4px; - line-height: 1; - padding: 4px 8px; - position: absolute; - right: 4px; - text-align: center; - } +/* Patch 2018-02-10: Add explicit button for openeing firewall */ +#nanoAdvancedSectionStrip { + font-size: 2em; + margin: 0px; + } +#nanoAdvancedSectionStrip .tool { + margin-left: 0px; +} body.dirty #refresh { - display: block; + color: red; } -body.dirty #refresh:hover { - color: black; +body #refresh:hover { + color: #444;; } #tooltip { diff --git a/src/popup.html b/src/popup.html index cd33531a69dc1..0795f799afa59 100644 --- a/src/popup.html +++ b/src/popup.html @@ -33,11 +33,18 @@

 

 

?

-

 

?

+ + +

 

+

+ + +

+

 

 

From e141a62007fd006f6862e0988846c80fbf13cd04 Mon Sep 17 00:00:00 2001 From: jspenguin2017 Date: Sat, 10 Feb 2018 13:06:33 -0700 Subject: [PATCH 2/7] looks good, just need i18n --- src/css/popup.css | 17 +++++++++-------- src/js/popup.js | 6 +++++- src/popup.html | 7 ++++--- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/css/popup.css b/src/css/popup.css index fca051e2f7991..458c313bbe90c 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -26,7 +26,12 @@ h2 { background-color: #eee; border: 0; color: #666; + + /* Patch 2018-02-10: Add explicit button for openeing firewall */ + /* cursor: pointer; + */ + font-size: 100%; font-weight: normal; padding: 0.2em; @@ -142,8 +147,7 @@ body.off #switch .fa { margin: 0.8em 0 0.4em 0; } #basicTools { - /* Patch 2018-02-01: Make it two rows */ - margin-bottom: 1.0em; + margin-bottom: 1.4em; } .tool:first-child { margin-left: 0; @@ -152,10 +156,7 @@ body.off #switch .fa { color: #aaa; cursor: pointer; visibility: hidden; - - /* Patch 2018-02-01: Adjust spacing for two rows basic tools */ - margin-left: 1.4em; - + margin-left: 0.4em; min-width: 1em; padding: 0 0.2em; unicode-bidi: embed; @@ -226,11 +227,11 @@ body[dir="rtl"] #extraTools > span > span.badge { } /* Patch 2018-02-10: Add explicit button for openeing firewall */ -#nanoAdvancedSectionStrip { +#nanoCacheControlStrip { font-size: 2em; margin: 0px; } -#nanoAdvancedSectionStrip .tool { +#nanoCacheControlStrip .tool { margin-left: 0px; } body.dirty #refresh { diff --git a/src/js/popup.js b/src/js/popup.js index 5ba4b473b64dd..bb32d7435aefd 100644 --- a/src/js/popup.js +++ b/src/js/popup.js @@ -1095,11 +1095,15 @@ var onHideTooltip = function() { uDom('#switch').on('click', toggleNetFilteringSwitch); uDom('#gotoZap').on('click', gotoZap); + // Patch 2018-02-01: Add force enable scroll uDom('#forceEnableScroll').on('click', forceEnableScroll); uDom('#gotoPick').on('click', gotoPick); - uDom('h2').on('click', toggleFirewallPane); + + // Patch 2018-02-10: Move openeing firewall pane to a explicit button + uDom('#nanoFirewallPaneToggle').on('click', toggleFirewallPane); + uDom('#refresh').on('click', reloadTab); uDom('.hnSwitch').on('click', toggleHostnameSwitch); uDom('#saveRules').on('click', saveFirewallRules); diff --git a/src/popup.html b/src/popup.html index 0795f799afa59..1cc6abaa7eb9c 100644 --- a/src/popup.html +++ b/src/popup.html @@ -17,6 +17,8 @@

+ + @@ -39,9 +41,8 @@

 

?

-

 

-

- +

 

+

From 51bbfdcbee70937f7b3665dc2b9538b1cae0dd97 Mon Sep 17 00:00:00 2001 From: jspenguin2017 Date: Sat, 10 Feb 2018 13:23:24 -0700 Subject: [PATCH 3/7] add i18n --- src/_nano-locales/en/messages.nano.js | 16 ++++++++++++++-- src/_nano-locales/zh_CN/messages.nano.js | 18 ++++++++++++++++-- src/popup.html | 8 ++++---- 3 files changed, 34 insertions(+), 8 deletions(-) diff --git a/src/_nano-locales/en/messages.nano.js b/src/_nano-locales/en/messages.nano.js index bc52ee73cde5b..6c1442c509d66 100644 --- a/src/_nano-locales/en/messages.nano.js +++ b/src/_nano-locales/en/messages.nano.js @@ -324,14 +324,26 @@ }, // Popup tooltips + "popupCacheControlPrompt": { + "message": "cache control", + "description": "The cache control strip name" + }, + "popupTipOpenFirewallPane": { + "message": "Toggle the firewall pane", + "description": "Tooltip for toggle firewall pane button" + }, + "popupTipRefreshButton": { + "message": "Click: refresh this page.\n\nCtrl+click: refresh this page bypassing cache.", + "description": "English: Click: refresh this page.\n\nCtrl+click: refresh this page bypassing cache." + }, // TODO 2018-02-02: Beta stage, do not translate! "popupTipForceEnableScroll": { "message": "(beta) Enter force scroll mode (will break layout)", - "description": "Force scroll button" + "description": "Tooltip for force scroll button" }, "popupTipBugReporter": { "message": "(beta) Open the bug reporter", - "description": "Bug reporter button" + "description": "Tooltip for bug reporter button" }, // Based on message of about page diff --git a/src/_nano-locales/zh_CN/messages.nano.js b/src/_nano-locales/zh_CN/messages.nano.js index 063145a7485c4..c67ed542ea3a3 100644 --- a/src/_nano-locales/zh_CN/messages.nano.js +++ b/src/_nano-locales/zh_CN/messages.nano.js @@ -170,15 +170,29 @@ }, // Popup tooltips + "popupCacheControlPrompt": { + "message": "缓存控制", + "description": "The cache control strip name" + }, + "popupTipOpenFirewallPane": { + // TODO 2018-02-10: There must be a better translation, but translated like so to stay + // consistent with uBlock Origin + "message": "是否显示防火墙边窗", + "description": "Tooltip for toggle firewall pane button" + }, + "popupTipRefreshButton": { + "message": "单击:刷新当前页面\n\nCtrl + 单击:无视缓存并刷新当前页面", + "description": "English: Click: refresh this page.\n\nCtrl+click: refresh this page bypassing cache." + }, // TODO 2018-02-02: Beta stage, do not translate! /* "popupTipForceEnableScroll": { "message": "进入临时强制滚动模式(会破坏布局)", - "description": "Force scroll button" + "description": "Tooltip for force scroll button" }, "popupTipBugReporter": { "message": "打开问题汇报器", - "description": "Bug reporter button" + "description": "Tooltip for bug reporter button" }, */ diff --git a/src/popup.html b/src/popup.html index 1cc6abaa7eb9c..45e96e0ead96c 100644 --- a/src/popup.html +++ b/src/popup.html @@ -18,7 +18,7 @@

- + @@ -40,10 +40,10 @@

 

?

- -

 

+ +

 

- +

 

From c1ec5b05eebe685d1b04642ec4dcd99a91a15a05 Mon Sep 17 00:00:00 2001 From: jspenguin2017 Date: Sat, 10 Feb 2018 13:33:11 -0700 Subject: [PATCH 4/7] minor cleanup --- src/_nano-locales/zh_CN/messages.nano.js | 2 +- src/css/popup.css | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/_nano-locales/zh_CN/messages.nano.js b/src/_nano-locales/zh_CN/messages.nano.js index c67ed542ea3a3..a806e41907fb4 100644 --- a/src/_nano-locales/zh_CN/messages.nano.js +++ b/src/_nano-locales/zh_CN/messages.nano.js @@ -176,7 +176,7 @@ }, "popupTipOpenFirewallPane": { // TODO 2018-02-10: There must be a better translation, but translated like so to stay - // consistent with uBlock Origin + // consistent with other strings of uBlock Origin "message": "是否显示防火墙边窗", "description": "Tooltip for toggle firewall pane button" }, diff --git a/src/css/popup.css b/src/css/popup.css index 458c313bbe90c..7cf4b6d63802b 100644 --- a/src/css/popup.css +++ b/src/css/popup.css @@ -147,7 +147,8 @@ body.off #switch .fa { margin: 0.8em 0 0.4em 0; } #basicTools { - margin-bottom: 1.4em; + /* Patch 2018-02-01: Make it two rows */ + margin-bottom: 1.2em; } .tool:first-child { margin-left: 0; @@ -156,7 +157,10 @@ body.off #switch .fa { color: #aaa; cursor: pointer; visibility: hidden; - margin-left: 0.4em; + + /* Patch 2018-02-01: Adjust spacing for two rows basic tools */ + margin-left: 0.6em; + min-width: 1em; padding: 0 0.2em; unicode-bidi: embed; From 0c34f129fe2243ee14351608383aa49c33e42985 Mon Sep 17 00:00:00 2001 From: jspenguin2017 Date: Sat, 10 Feb 2018 13:39:36 -0700 Subject: [PATCH 5/7] tweak i18n --- src/_nano-locales/en/messages.nano.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_nano-locales/en/messages.nano.js b/src/_nano-locales/en/messages.nano.js index 6c1442c509d66..5b797e4bb83d8 100644 --- a/src/_nano-locales/en/messages.nano.js +++ b/src/_nano-locales/en/messages.nano.js @@ -333,7 +333,7 @@ "description": "Tooltip for toggle firewall pane button" }, "popupTipRefreshButton": { - "message": "Click: refresh this page.\n\nCtrl+click: refresh this page bypassing cache.", + "message": "Click to refresh this page.\n\nCtrl+click to refresh this page bypassing cache.", "description": "English: Click: refresh this page.\n\nCtrl+click: refresh this page bypassing cache." }, // TODO 2018-02-02: Beta stage, do not translate! From 71dc4c36542a02e74a247b6a7f688f300e3c10eb Mon Sep 17 00:00:00 2001 From: jspenguin2017 Date: Sat, 10 Feb 2018 13:41:48 -0700 Subject: [PATCH 6/7] update en locale --- src/_nano-locales/en/messages.nano.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_nano-locales/en/messages.nano.js b/src/_nano-locales/en/messages.nano.js index 5b797e4bb83d8..ec0e969f9d01a 100644 --- a/src/_nano-locales/en/messages.nano.js +++ b/src/_nano-locales/en/messages.nano.js @@ -333,8 +333,8 @@ "description": "Tooltip for toggle firewall pane button" }, "popupTipRefreshButton": { - "message": "Click to refresh this page.\n\nCtrl+click to refresh this page bypassing cache.", - "description": "English: Click: refresh this page.\n\nCtrl+click: refresh this page bypassing cache." + "message": "Click to refresh this page.\n\nCtrl+click to refresh this page while bypassing cache.", + "description": "English: Click to refresh this page.\n\nCtrl+click to refresh this page while bypassing cache." }, // TODO 2018-02-02: Beta stage, do not translate! "popupTipForceEnableScroll": { From 37ee3ae1036a283f46375f9ca97641f1039ee781 Mon Sep 17 00:00:00 2001 From: jspenguin2017 Date: Sat, 10 Feb 2018 20:35:55 -0700 Subject: [PATCH 7/7] Import https://github.com/gorhill/uBlock/commit/b0600645a6a944bb0f6857608486ed1c53c080ce --- assets/assets.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/assets.json b/assets/assets.json index a1a99090bc325..6f9d4f6dce709 100644 --- a/assets/assets.json +++ b/assets/assets.json @@ -608,7 +608,8 @@ "title": "POL: Official Polish filters for AdBlock, uBlock Origin & AdGuard", "lang": "pl", "contentURL": "https://raw.githubusercontent.com/MajkiIT/polish-ads-filter/master/polish-adblock-filters/adblock.txt", - "supportURL": "https://github.com/MajkiIT/polish-ads-filter/issues" + "supportURL": "https://github.com/MajkiIT/polish-ads-filter/issues", + "instructionURL": "https://github.com/MajkiIT/polish-ads-filter#polish-filters-for-adblock-ublock-origin--adguard" }, "RUS-0": { "content": "filters",