diff --git a/platform/mv3/chromium/manifest.json b/platform/mv3/chromium/manifest.json index 49f1381b2c679..72760301c5a32 100644 --- a/platform/mv3/chromium/manifest.json +++ b/platform/mv3/chromium/manifest.json @@ -25,7 +25,7 @@ "128": "img/icon_128.png" }, "manifest_version": 3, - "minimum_chrome_version": "119.0", + "minimum_chrome_version": "122.0", "name": "__MSG_extName__", "options_page": "dashboard.html", "optional_host_permissions": [ @@ -41,6 +41,5 @@ "storage": { "managed_schema": "managed_storage.json" }, - "version": "1.0", - "web_accessible_resources": [] + "version": "1.0" } diff --git a/platform/mv3/extension/_locales/en/messages.json b/platform/mv3/extension/_locales/en/messages.json index 60cc95401447c..17a5b24cd7935 100644 --- a/platform/mv3/extension/_locales/en/messages.json +++ b/platform/mv3/extension/_locales/en/messages.json @@ -231,8 +231,44 @@ "message": "Show the number of blocked requests on the toolbar icon", "description": "Label for a checkbox in the options page" }, + "enableStrictBlockLabel": { + "message": "Enable strict blocking", + "description": "Label for a checkbox in the options page" + }, + "enableStrictBlockLegend": { + "message": "Navigation to potentially undesirable sites will be blocked, and you will be offered the option to proceed.", + "description": "Label for a checkbox in the options page" + }, "findListsPlaceholder": { "message": "Find lists", "description": "Placeholder for the input field used to find lists" + }, + "strictblockTitle": { + "message": "Page blocked", + "description": "Webpage title for the strict-blocked page" + }, + "strictblockSentence1": { + "message": "uBO Lite has prevented the following page from loading:", + "description": "Sentence used in the strict-blocked page" + }, + "strictblockNoParamsPrompt": { + "message": "without parameters", + "description": "Label to be used for the parameter-less URL" + }, + "strictblockBack": { + "message": "Go back", + "description": "A button to go back to the previous webpage" + }, + "strictblockClose": { + "message": "Close this window", + "description": "A button to close the current tab" + }, + "strictblockDontWarn": { + "message": "Don't warn me again about this site", + "description": "Label for checkbox in document-blocked page" + }, + "strictblockProceed": { + "message": "Proceed", + "description": "A button to navigate to the blocked page" } } diff --git a/platform/mv3/extension/css/settings.css b/platform/mv3/extension/css/settings.css index feefcadd8c3ee..a8b07d2a1894c 100644 --- a/platform/mv3/extension/css/settings.css +++ b/platform/mv3/extension/css/settings.css @@ -12,8 +12,11 @@ body.firstRun .firstRun { h3 { margin: 1em 0; } -p { - white-space: pre-line; + +label + legend { + color: color-mix(in srgb, currentColor 69%, transparent); + font-size: small; + margin-inline-start: var(--default-gap-large); } body[data-forbid~="dashboard"] #dashboard-nav [data-pane="settings"], diff --git a/platform/mv3/extension/css/strictblock.css b/platform/mv3/extension/css/strictblock.css new file mode 100644 index 0000000000000..f7534078cca7b --- /dev/null +++ b/platform/mv3/extension/css/strictblock.css @@ -0,0 +1,147 @@ +/** + uBlock Origin - a browser extension to block requests. + Copyright (C) 2018-present Raymond Hill + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see {http://www.gnu.org/licenses/}. + + Home: https://github.com/gorhill/uBlock +*/ + +body { + display: flex; + padding: var(--default-gap-xxlarge) var(--default-gap-small); + justify-content: center; + } +:root.mobile body { + padding: var(--default-gap-small); + } + +#rootContainer { + width: min(100%, 640px); + } +#rootContainer > * { + margin: 0 0 var(--default-gap-xxlarge) 0; + } +:root.mobile #rootContainer > * { + margin-bottom: var(--default-gap-xlarge); + } + +p { + margin: 0.5em 0; + } +a { + text-decoration: none; + } +.code { + font-size: 13px; + word-break: break-all; + } +#warningSign { + color: var(--accent-surface-1); + fill: var(--accent-surface-1); + font-size: 96px; + line-height: 1; + width: 100%; + } +:root.mobile #warningSign { + font-size: 64px; + } +#theURL { + color: var(--ink-2); + padding: 0; + } +#theURL > * { + margin: 0; + } +#theURL > p { + position: relative; + z-index: 10; + } +#theURL > p > span:first-of-type { + display: block; + max-height: 6lh; + overflow-y: auto; + } +:root.mobile #theURL > p > span:first-of-type { + max-height: 3lh; + } +#theURL #toggleParse { + background-color: transparent; + top: 100%; + box-sizing: border-box; + color: var(--ink-3); + fill: var(--ink-3); + cursor: pointer; + font-size: 1.2rem; + padding: var(--default-gap-xxsmall); + position: absolute; + transform: translate(0, -50%); + } +#theURL:not(.collapsed) #toggleParse > span:first-of-type { + display: none; + } +#theURL.collapsed #toggleParse > span:last-of-type { + display: none; + } +body[dir="ltr"] #toggleParse { + right: 0; + } +body[dir="rtl"] #toggleParse { + left: 0; + } +#theURL > p:hover #toggleParse { + transform: translate(0, -50%) scale(1.15); + } +#parsed { + background-color: var(--surface-1); + border: 4px solid var(--surface-2); + font-size: small; + overflow-x: auto; + padding: var(--default-gap-xxsmall); + text-align: initial; + text-overflow: ellipsis; + } +#theURL.collapsed > #parsed { + display: none; + } +#parsed ul, #parsed li { + list-style-type: none; + } +#parsed li { + white-space: nowrap; + } +#parsed span { + display: inline-block; + } +#parsed span:first-of-type { + font-weight: bold; + } + +#actionContainer { + display: flex; + justify-content: space-between; + } +:root.mobile #actionContainer { + justify-content: center; + display: flex; + flex-direction: column; + } +#actionContainer > button { + margin-bottom: 2rem + } + +/* Small-screen devices */ +:root.mobile button { + width: 100%; + } diff --git a/platform/mv3/extension/dashboard.html b/platform/mv3/extension/dashboard.html index bcd1726bd05a3..5ac63f3d06d0f 100644 --- a/platform/mv3/extension/dashboard.html +++ b/platform/mv3/extension/dashboard.html @@ -31,6 +31,7 @@

+

+
+ exclamation-triangle +
+ +
+

_

+ +
+ +
+ +
+ +
+ + + +
+
+ + + + + + + diff --git a/src/document-blocked.html b/src/document-blocked.html index 56d6a95a42b9d..4c69359f1664e 100644 --- a/src/document-blocked.html +++ b/src/document-blocked.html @@ -47,10 +47,12 @@ diff --git a/tools/make-mv3.sh b/tools/make-mv3.sh index c6b02abddfec9..287a7b08b26bd 100755 --- a/tools/make-mv3.sh +++ b/tools/make-mv3.sh @@ -107,6 +107,7 @@ if [ "$QUICK" != "yes" ]; then cp platform/mv3/package.json "$TMPDIR"/ cp platform/mv3/*.js "$TMPDIR"/ cp platform/mv3/*.mjs "$TMPDIR"/ + cp platform/mv3/*.html "$TMPDIR"/ cp platform/mv3/extension/js/utils.js "$TMPDIR"/js/ cp -R "$UBO_DIR"/src/js/resources "$TMPDIR"/js/ cp "$UBO_DIR"/assets/assets.dev.json "$TMPDIR"/