From 8d9c068e478757ce541aadf6ff4987b1572e2802 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 15 Apr 2022 10:29:25 +0900 Subject: [PATCH 01/39] Fix: Install - Update with `git stash` & `git stash pop` at dirty --- install.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install.sh b/install.sh index 2f32316..15cb4ec 100755 --- a/install.sh +++ b/install.sh @@ -716,8 +716,20 @@ update_profile() { local LEPTONGITPATH="${Path}/chrome/.git" if [ "${Type}" == "Git" ]; then + local gitDirty="" + + if [[ $(git diff --stat) != '' ]]; then + gitDirty="true" + git --git-dir "${LEPTONGITPATH}" stash + fi + git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" git --git-dir "${LEPTONGITPATH}" pull --no-edit + + if [ "${customFileExist}" == "true" ]; then + git --git-dir "${LEPTONGITPATH}" stash pop + fi + elif [ "${Type}" == "Local" ] || [ "${Type}" == "Release" ]; then check_chrome_exist clone_lepton From d16ae96c614f7bf0f156b784d5028c2048796077 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 15 Apr 2022 14:35:26 +0900 Subject: [PATCH 02/39] Add: Install - Custom related scripts --- install.sh | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/install.sh b/install.sh index 15cb4ec..03880f3 100755 --- a/install.sh +++ b/install.sh @@ -616,6 +616,73 @@ check_install_types() { fi } +#== Custom Install ============================================================= +customFiles=( + user-overrides.js + userChrome-overrides.css + userContent-overrides.css +) + +customFileExist="" +check_custom_files() { + paths_filter customFiles + + if [ "${#customFiles[@]}" -gt 0 ]; then + customFileExist="true" + lepton_ok_message "Check custom file detected" + + for customFile in "${customFiles[@]}"; do + echo "- ${customFile}" + done + fi +} + +copy_custom_files() { + if [ "${customFileExist}" == "true" ]; then + # If Release or Network mode, Local is passed (Already copied) + if [ "${leptonInstallType}" -ne "Local" ]; then + for profilePath in "${firefoxProfilePaths[@]}"; do + for customFile in "${customFiles[@]}"; do + if [ "${customFiles}" == "user-overrides.js" ]; then + autocp "${customFile}" "${profilePath}/user-overrides.js" + else + autocp "${customFile}" "${profilePath}/chrome" + fi + done + done + fi + + lepton_ok_message "End custom file copy" + fi +} + +customFileApplied="" +apply_custom_files() { + for profilePath in "${firefoxProfilePaths[@]}"; do + for customFile in "${customFiles[@]}"; do + local targetFile="${customFile//-overrides/}" + if [ "${customFiles}" == "user-overrides.js" ]; then + if [ -f "${profilePath}/user-overrides.js" ]; then + customFileApplied="true" + cat "${profilePath}/user-overrides.js" >> "${profilePath}/${targetFile}" + elif [ -f "${profilePath}/chrome/user-overrides.js" ]; then + customFileApplied="true" + cat "${profilePath}/chrome/user-overrides.js" >> "${profilePath}/${targetFile}" + fi + else + if [ -f "${profilePath}/chrome/${customFile}" ]; then + customFileApplied="true" + cat "${profilePath}/chrome/${customFile}" >> "${profilePath}/chrome/${targetFile}" + fi + fi + done + done + + if [ "${customFileApplied}" == "true" ]; then + lepton_ok_message "Custom file applied" + fi +} + #== Install Helpers ============================================================ chromeDuplicate="" check_chrome_exist() { @@ -673,10 +740,14 @@ copy_lepton() { #== Each Install =============================================================== install_local() { copy_lepton "${currentDir}" "user.js" + copy_custom_files + apply_custom_files } install_release() { copy_lepton "chrome" "user.js" + copy_custom_files + apply_custom_files } install_network() { @@ -685,6 +756,8 @@ install_network() { clone_lepton copy_lepton + copy_custom_files + apply_custom_files clean_lepton check_chrome_restore @@ -752,6 +825,9 @@ update_profile() { done fi done + + apply_custom_files + clean_lepton check_chrome_restore } @@ -785,6 +861,8 @@ install_lepton() { update_profile_paths write_lepton_info + check_custom_files + # Install Mode if [ "${updateMode}" == true ]; then update_profile From 8f1de4cff11621e04bd500cd98c864d4dce34b4d Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sun, 17 Apr 2022 02:43:36 +0900 Subject: [PATCH 03/39] Fix: Install - String condition --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 03880f3..4cdecef 100755 --- a/install.sh +++ b/install.sh @@ -640,7 +640,7 @@ check_custom_files() { copy_custom_files() { if [ "${customFileExist}" == "true" ]; then # If Release or Network mode, Local is passed (Already copied) - if [ "${leptonInstallType}" -ne "Local" ]; then + if [ "${leptonInstallType}" != "Local" ]; then for profilePath in "${firefoxProfilePaths[@]}"; do for customFile in "${customFiles[@]}"; do if [ "${customFiles}" == "user-overrides.js" ]; then From 2c884f5ab50fd8fd79c7e495e4f52465de56b32f Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sun, 17 Apr 2022 02:53:14 +0900 Subject: [PATCH 04/39] Fix: Install - Custom file copy location --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 4cdecef..d0f0e5b 100755 --- a/install.sh +++ b/install.sh @@ -643,10 +643,10 @@ copy_custom_files() { if [ "${leptonInstallType}" != "Local" ]; then for profilePath in "${firefoxProfilePaths[@]}"; do for customFile in "${customFiles[@]}"; do - if [ "${customFiles}" == "user-overrides.js" ]; then - autocp "${customFile}" "${profilePath}/user-overrides.js" + if [ "${customFile}" == "user-overrides.js" ]; then + autocp "${customFile}" "${profilePath}/${customFile}" else - autocp "${customFile}" "${profilePath}/chrome" + autocp "${customFile}" "${profilePath}/chrome/${customFile}" fi done done @@ -661,7 +661,7 @@ apply_custom_files() { for profilePath in "${firefoxProfilePaths[@]}"; do for customFile in "${customFiles[@]}"; do local targetFile="${customFile//-overrides/}" - if [ "${customFiles}" == "user-overrides.js" ]; then + if [ "${customFile}" == "user-overrides.js" ]; then if [ -f "${profilePath}/user-overrides.js" ]; then customFileApplied="true" cat "${profilePath}/user-overrides.js" >> "${profilePath}/${targetFile}" From ba16f7e1e0451271e222243fc7ab353aeeb97aff Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 18 Apr 2022 09:06:51 +0900 Subject: [PATCH 05/39] Add: Install - git stash at update port to pwsh --- install.ps1 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/install.ps1 b/install.ps1 index 515ebda..d8ef28d 100644 --- a/install.ps1 +++ b/install.ps1 @@ -735,9 +735,20 @@ function Update-Profile() { $local:Path = $LEPTONINFO["${section}"]["Path"] $local:LEPTONGITPATH="${Path}\chrome\.git" - if ( "${Type}" -eq "Git" ){ + if ( "${Type}" -eq "Git" ) { + $local:gitDirty = $false + + if ( "$(git diff --stat)" -ne '' ) { + $local:gitDirty = $true + git --git-dir "${LEPTONGITPATH}" checkout stash + } + git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" git --git-dir "${LEPTONGITPATH}" pull --no-edit + + if ( "${gitDirty}" -eq $true ) { + git --git-dir "${LEPTONGITPATH}" checkout stash pop + } } elseif ( "${Type}" -eq "Local" -or "${Type}" -eq "Release" ) { Check-ChromeExist From 4e0f996fa7f5b6a30299d38c05be13380a5da56f Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 18 Apr 2022 09:07:23 +0900 Subject: [PATCH 06/39] Doc: More icon reference link --- docs/Project_Structure.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/Project_Structure.md b/docs/Project_Structure.md index 91857e6..355a43e 100644 --- a/docs/Project_Structure.md +++ b/docs/Project_Structure.md @@ -43,7 +43,8 @@ Most of them are made in SVG. Except for illustrations, there must be an `fill="context-fill" fill-opacity="context-fill-opacity"` property to dynamically determine color and transparency. Icons are mainly [FirefoxUX/photon-icons](https://github.com/FirefoxUX/photon-icons) -or [microsoft/fluentui-system-icons](https://github.com/microsoft/fluentui-system-icons). +or [microsoft/fluentui-system-icons](https://github.com/microsoft/fluentui-system-icons). +Although not yet used, [tabler/tabler-icons](https://github.com/tabler/tabler-icons) and [feathericons/feather](https://github.com/feathericons/feather) can also be referred to. You can see more in the issue, [Unify icon design langauge #213](https://github.com/black7375/Firefox-UI-Fix/issues/213). From 736004f90a2dfaf9fc34c22d72c2a8fe9a2c8d6e Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 18 Apr 2022 09:11:44 +0900 Subject: [PATCH 07/39] Add: Install - custom apply script port to pwsh --- install.ps1 | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/install.ps1 b/install.ps1 index d8ef28d..f1ce468 100644 --- a/install.ps1 +++ b/install.ps1 @@ -634,6 +634,76 @@ function Check-InstallTypes() { } } +#== Custom Install ============================================================= +$customFiles = @( + "user-overrides.js", + "userChrome-overrides.css", + "userContent-overrides.css" +) + +$customFileExist = $false +function Check-CustomFiles() { + $global:customFiles = Filter-Path $customFiles + + if ( $global:customFiles.Length -gt 0 ) { + $global:customFileExist = $true + Lepton-OKMessage "Check custom file detected" + + foreach ( $customFile in $global:customFiles ) { + Write-Host "- ${customFile}" + } + } +} + +function Copy-CustomFiles() { + if ( "${customFileExist}" -eq $true ) { + # If Release or Network mode, Local is passed (Already copied) + if ( "${leptonInstallType}" -ne "Local" ) { + foreach ( $profilePath in $global:firefoxProfilePaths ) { + foreach ( $customFile in $global:customFiles ) { + if ( "${customFile}" -eq "user-overrides.js" ) { + Copy-Auto "${customFile}" "${profilePath}\${customFile}" + } + else { + Copy-Auto "${customFile}" "${profilePath}\chrome\${customFile}" + } + } + } + } + + Lepton-OKMessage "End custom file copy" + } +} + +$customFileApplied = $false +function Apply-CustomFiles() { + foreach ( $profilePath in $global:firefoxProfilePaths ) { + foreach ( $customFile in $global:customFiles ) { + $local:targetFile = $customFile.Replace("-overrides", "") + if ( "${customFile}" -eq "user-overrides.js" ) { + if ( Test-Path -Path "${profilePath}\user-overrides.js" -PathType leaf ) { + $global:customFileApplied = $true + Get-Content -Path "${profilePath}\user-overrides.js" >> "${profilePath}\${targetFile}" + } + elseif ( Test-Path -Path "${profilePath}\chrome\user-overrides.js" -PathType leaf ) { + $global:customFileApplied = $true + Get-Content -Path "${profilePath}\chrome\user-overrides.js" >> "${profilePath}\${targetFile}" + } + } + else { + if ( Test-Path -Path "${profilePath}\${customFile}" -PathType leaf ) { + $global:customFileApplied = $true + Get-Content -Path "${profilePath}\chrome\${customFile}" >> "${profilePath}\${targetFile}" + } + } + } + } + + if ( "${customFileApplied}" -eq $true ) { + Lepton-OKMessage "Custom file applied" + } +} + #== Install Helpers ============================================================ $chromeDuplicate = $false function Check-ChromeExist() { @@ -692,10 +762,14 @@ function Copy-Lepton() { #== Each Install =============================================================== function Install-Local() { Copy-Lepton "${currentDir}" "user.js" + Copy-CustomFiles + Apply-CustomFiles } function Install-Release() { Copy-Lepton "chrome" "user.js" + Copy-CustomFiles + Apply-CustomFiles } function Install-Network() { @@ -704,6 +778,8 @@ function Install-Network() { Clone-Lepton Copy-Lepton + Copy-CustomFiles + Apply-CustomFiles Clean-Lepton Check-ChromeRestore @@ -773,6 +849,9 @@ function Update-Profile() { } } } + + Apply-CustomFiles + Clean-Lepton Check-ChromeRestore } @@ -795,6 +874,8 @@ function Install-Lepton { Update-ProfilePaths Write-LeptonInfo + Check-CustomFiles + if ( $updateMode ) { Update-Profile } From b1595b9ec5ed57e743594bf45a21555b689be9aa Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 18 Apr 2022 12:06:22 +0900 Subject: [PATCH 08/39] Fix: Install - output path --- install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.ps1 b/install.ps1 index f1ce468..a72d24d 100644 --- a/install.ps1 +++ b/install.ps1 @@ -693,7 +693,7 @@ function Apply-CustomFiles() { else { if ( Test-Path -Path "${profilePath}\${customFile}" -PathType leaf ) { $global:customFileApplied = $true - Get-Content -Path "${profilePath}\chrome\${customFile}" >> "${profilePath}\${targetFile}" + Get-Content -Path "${profilePath}\chrome\${customFile}" >> "${profilePath}\chrome\${targetFile}" } } } From 3623d8fd9eed0ea28813ad2a09c27d37dc785f05 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 18 Apr 2022 12:11:10 +0900 Subject: [PATCH 09/39] Fix: Install - Redirect to `Out-File` at pwsh --- install.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install.ps1 b/install.ps1 index a72d24d..e3bf038 100644 --- a/install.ps1 +++ b/install.ps1 @@ -111,6 +111,8 @@ function Check-Git() { } #== PATH / File ================================================================ +$PSDefaultParameterValues['Out-File:Encoding'] = 'utf8' + $currentDir = (Get-Location).path function Filter-Path() { @@ -683,17 +685,17 @@ function Apply-CustomFiles() { if ( "${customFile}" -eq "user-overrides.js" ) { if ( Test-Path -Path "${profilePath}\user-overrides.js" -PathType leaf ) { $global:customFileApplied = $true - Get-Content -Path "${profilePath}\user-overrides.js" >> "${profilePath}\${targetFile}" + Get-Content -Path "${profilePath}\user-overrides.js" | Out-File -FilePath "${profilePath}\${targetFile}" -Append } elseif ( Test-Path -Path "${profilePath}\chrome\user-overrides.js" -PathType leaf ) { $global:customFileApplied = $true - Get-Content -Path "${profilePath}\chrome\user-overrides.js" >> "${profilePath}\${targetFile}" + Get-Content -Path "${profilePath}\chrome\user-overrides.js" | Out-File -FilePath "${profilePath}\${targetFile}" -Append } } else { - if ( Test-Path -Path "${profilePath}\${customFile}" -PathType leaf ) { + if ( Test-Path -Path "${profilePath}\chrome\${customFile}" -PathType leaf ) { $global:customFileApplied = $true - Get-Content -Path "${profilePath}\chrome\${customFile}" >> "${profilePath}\chrome\${targetFile}" + Get-Content -Path "${profilePath}\chrome\${customFile}" | Out-File -FilePath "${profilePath}\chrome\${targetFile}" -Append } } } From 487bc59075ae6d654ed4f575a74d9b384979dc20 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 18 Apr 2022 14:42:53 +0900 Subject: [PATCH 10/39] Clean: Install - Apply custom file depth, message --- install.ps1 | 10 ++++------ install.sh | 10 ++++------ 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/install.ps1 b/install.ps1 index e3bf038..2a20504 100644 --- a/install.ps1 +++ b/install.ps1 @@ -692,17 +692,15 @@ function Apply-CustomFiles() { Get-Content -Path "${profilePath}\chrome\user-overrides.js" | Out-File -FilePath "${profilePath}\${targetFile}" -Append } } - else { - if ( Test-Path -Path "${profilePath}\chrome\${customFile}" -PathType leaf ) { - $global:customFileApplied = $true - Get-Content -Path "${profilePath}\chrome\${customFile}" | Out-File -FilePath "${profilePath}\chrome\${targetFile}" -Append - } + elseif ( Test-Path -Path "${profilePath}\chrome\${customFile}" -PathType leaf ) { + $global:customFileApplied = $true + Get-Content -Path "${profilePath}\chrome\${customFile}" | Out-File -FilePath "${profilePath}\chrome\${targetFile}" -Append } } } if ( "${customFileApplied}" -eq $true ) { - Lepton-OKMessage "Custom file applied" + Lepton-OKMessage "End custom file applied" } } diff --git a/install.sh b/install.sh index d0f0e5b..c7863da 100755 --- a/install.sh +++ b/install.sh @@ -669,17 +669,15 @@ apply_custom_files() { customFileApplied="true" cat "${profilePath}/chrome/user-overrides.js" >> "${profilePath}/${targetFile}" fi - else - if [ -f "${profilePath}/chrome/${customFile}" ]; then - customFileApplied="true" - cat "${profilePath}/chrome/${customFile}" >> "${profilePath}/chrome/${targetFile}" - fi + elif [ -f "${profilePath}/chrome/${customFile}" ]; then + customFileApplied="true" + cat "${profilePath}/chrome/${customFile}" >> "${profilePath}/chrome/${targetFile}" fi done done if [ "${customFileApplied}" == "true" ]; then - lepton_ok_message "Custom file applied" + lepton_ok_message "End custom file applied" fi } From 14f0678946776f81d3a54e313951cd2d8c56dfaa Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 19 Apr 2022 11:56:56 +0900 Subject: [PATCH 11/39] Clean: Move lepton stylesheets into their own files - `userChrome.css` -> `css/leptonChrome.css` - `userContent.css` -> `css/leptonContent.css` This allows users to easily update lepton while still keepping their own custom styles Co-authored-by: anzz1 <> --- userChrome.css => css/leptonChrome.css | 0 userContent.css => css/leptonContent.css | 0 docs/Project_Structure.md | 6 ------ package.json | 4 ++-- src/{userChrome.scss => leptonChrome.scss} | 0 src/{userContent.scss => leptonContent.scss} | 0 waterfox.sh | 4 ++-- 7 files changed, 4 insertions(+), 10 deletions(-) rename userChrome.css => css/leptonChrome.css (100%) rename userContent.css => css/leptonContent.css (100%) rename src/{userChrome.scss => leptonChrome.scss} (100%) rename src/{userContent.scss => leptonContent.scss} (100%) diff --git a/userChrome.css b/css/leptonChrome.css similarity index 100% rename from userChrome.css rename to css/leptonChrome.css diff --git a/userContent.css b/css/leptonContent.css similarity index 100% rename from userContent.css rename to css/leptonContent.css diff --git a/docs/Project_Structure.md b/docs/Project_Structure.md index 355a43e..3763558 100644 --- a/docs/Project_Structure.md +++ b/docs/Project_Structure.md @@ -90,12 +90,6 @@ CSS settings are relatively simple. - `userChrome-overrides.css` at `/chrome/` - `userContent-overrides.css` at `/chrome/` -Then, activate the following options: -- `userChrome.overrides` to `true` -- `userContent.overrides` to `true` - -It is now loading, and there is no need to manage the version control to the `userChrome.css` and `userContents.css` file. - `user-overrides.js` needs to use a shell script and has some priorities. - `/user-overrides.js` - `./user-overrides.js` (Will be copied `/chrome/`) diff --git a/package.json b/package.json index 7279baa..1b53499 100644 --- a/package.json +++ b/package.json @@ -14,10 +14,10 @@ }, "homepage": "https://github.com/black7375/Firefox-UI-Fix#readme", "scripts": { - "build": "sass --no-source-map src/userChrome.scss ./userChrome.css && sass --no-source-map src/userContent.scss ./userContent.css && prettier --write userChrome.css userContent.css", + "build": "sass --no-source-map src/leptonChrome.scss css/leptonChrome.css && sass --no-source-map src/leptonContent.scss css/leptonContent.css && prettier --write css/leptonChrome.css css/leptonContent.css", "format": "prettier --write .", "test": "jest", - "validate": "csstree-validator userChrome.css; csstree-validator userContent.css" + "validate": "csstree-validator css/leptonChrome.css; csstree-validator css/leptonContent.css" }, "devDependencies": { "csstree-validator": "^3.0.0", diff --git a/src/userChrome.scss b/src/leptonChrome.scss similarity index 100% rename from src/userChrome.scss rename to src/leptonChrome.scss diff --git a/src/userContent.scss b/src/leptonContent.scss similarity index 100% rename from src/userContent.scss rename to src/leptonContent.scss diff --git a/waterfox.sh b/waterfox.sh index cad57a6..071178e 100755 --- a/waterfox.sh +++ b/waterfox.sh @@ -7,5 +7,5 @@ replace_icon_path() { file=$1 sed -i "s/\.\/icons\//chrome:\/\/browser\/skin\/lepton\//g" "${file}" } -replace_icon_path userChrome.css -replace_icon_path userContent.css +replace_icon_path css/leptonChrome.css +replace_icon_path css/leptonContent.css From 36ee2e016f422dba06c989437a6d4dc2dd57e39d Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 19 Apr 2022 15:06:46 +0900 Subject: [PATCH 12/39] Fix: Replace userChrome and userContent with stubs which import lepton Co-authored-by: anzz1 <> --- userChrome.css | 22 ++++++++++++++++++++++ userContent.css | 4 ++++ 2 files changed, 26 insertions(+) create mode 100644 userChrome.css create mode 100644 userContent.css diff --git a/userChrome.css b/userChrome.css new file mode 100644 index 0000000..1836c86 --- /dev/null +++ b/userChrome.css @@ -0,0 +1,22 @@ +/** Import Lepton stylesheet (Chrome) *****************************************/ +@import url("css/leptonChrome.css"); + + +/** Add your custom styles below **********************************************/ + +/* Enable option to edit bookmark URLs under Add Bookmark (blue star) menu */ +/* + * #editBMPanel_locationRow { + * visibility: visible !important; + * } +*/ + +/* Disable Email Image/Audio/Video and Set as Desktop Background context menu items */ +/* + * #context-sendimage, + * #context-sendvideo, + * #context-sendaudio, + * #context-setDesktopBackground { + * display: none !important; + * } +*/ diff --git a/userContent.css b/userContent.css new file mode 100644 index 0000000..2fe02a6 --- /dev/null +++ b/userContent.css @@ -0,0 +1,4 @@ +/** Import Lepton stylesheet (Content) ****************************************/ +@import url("css/leptonContent.css"); + +/** Add your custom styles below **********************************************/ From 918e24ee5c977c23dbca999b4307e83a6552fb88 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 19 Apr 2022 15:09:44 +0900 Subject: [PATCH 13/39] Fix: icon path --- css/leptonChrome.css | 316 +++++++++--------- css/leptonContent.css | 64 ++-- src/contents/_error_page.scss | 10 +- src/contents/_video_player.scss | 4 +- src/icons/_global_menu.scss | 40 +-- src/icons/_library.scss | 12 +- src/icons/_main_menubar.scss | 6 +- src/icons/_panel.scss | 44 +-- src/icons/_waterfox.scss | 6 +- src/icons/context_menu/_content_area.scss | 80 ++--- src/icons/context_menu/_others.scss | 42 +-- src/icons/context_menu/_place.scss | 18 +- src/icons/context_menu/_tab_toolbar.scss | 34 +- src/library/_default_open.scss | 8 +- src/library/_inbox.scss | 4 +- src/library/_menubar.scss | 4 +- src/library/_standard_folder.scss | 4 +- src/menu/_icons_layout.scss | 4 +- .../_show_close_button_at_hover.scss | 2 +- src/tabbar/newtab_button/_looks_like_tab.scss | 2 +- .../selected_tab/_bottom_rounded_corner.scss | 4 +- waterfox.sh | 2 +- 22 files changed, 355 insertions(+), 355 deletions(-) diff --git a/css/leptonChrome.css b/css/leptonChrome.css index b1cbef2..3790864 100644 --- a/css/leptonChrome.css +++ b/css/leptonChrome.css @@ -3965,7 +3965,7 @@ --tab-selected-bgcolor: unset !important; /* Original: rgb(255,255,255); */ --tab-selected-bgimage: unset !important; - /* Nightly 101 */ + /* Above FF v101 */ } #tabbrowser-tabs:not([movingtab]) @@ -4125,13 +4125,13 @@ tab[visuallyselected] > stack::before { left: var(--tab-corner-position) !important; - background-image: url("./icons/tab-bottom-corner-left.svg"); + background-image: url("../icons/tab-bottom-corner-left.svg"); } tab[visuallyselected] > stack::after { left: auto; right: var(--tab-corner-position); - background-image: url("./icons/tab-bottom-corner-right.svg"); + background-image: url("../icons/tab-bottom-corner-right.svg"); } @media (-moz-gtk-csd-available) { @@ -4473,7 +4473,7 @@ padding-top: var(--tab-block-margin) !important; /* Corner Rounding Image */ --newtab-position: calc((var(--tab-corner-rounding) / 2) * -1); - background-image: url("./icons/tab-bottom-corner-left.svg"), url("./icons/tab-bottom-corner-right.svg"); + background-image: url("../icons/tab-bottom-corner-left.svg"), url("../icons/tab-bottom-corner-right.svg"); background-repeat: no-repeat; background-position: left var(--newtab-position) bottom var(--tabs-navbar-original-shadow-size), right var(--newtab-position) bottom var(--tabs-navbar-original-shadow-size); @@ -4647,7 +4647,7 @@ } /* Closed Button's icon thicker */ .tabbrowser-tab .tab-content > .close-icon { - list-style-image: url("./icons/dismiss-filled.svg") !important; + list-style-image: url("../icons/dismiss-filled.svg") !important; } /* Closed Button's icon larger */ @@ -5090,7 +5090,7 @@ #editBMPanel_folderMenuList:not([selectedGuid="toolbar_____"], [selectedGuid="menu________"]), #editBMPanel_folderMenuList .folder-icon:not([id]), .downloadIconShow > .button-box > .button-icon { - list-style-image: url("./icons/folder.svg") !important; + list-style-image: url("../icons/folder.svg") !important; } /* Standard Folder - Open */ @@ -5098,7 +5098,7 @@ .bookmark-item[container="true"]:not([query="true"], [tagContainer], [dayContainer])[open="true"], :-moz-any(#bookmarks-view, #historyTree, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(title, container, open) { - list-style-image: url("./icons/folder-open.svg") !important; + list-style-image: url("../icons/folder-open.svg") !important; } /*= Other Folder - Inbox Icon ================================================*/ @@ -5112,7 +5112,7 @@ treechildren::-moz-tree-image(container, queryFolder_unfiled_____), #editBMPanel_unfiledRootItem, #editBMPanel_folderMenuList[selectedGuid="unfiled_____"] { - list-style-image: url("./icons/mail-inbox-all.svg") !important; + list-style-image: url("../icons/mail-inbox-all.svg") !important; } /* Other Folder - Open */ @@ -5123,7 +5123,7 @@ treechildren::-moz-tree-image(container, open, OrganizerQuery_UnfiledBookmarks), :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, open, queryFolder_unfiled_____) { - list-style-image: url("./icons/mail-inbox.svg") !important; + list-style-image: url("../icons/mail-inbox.svg") !important; } /*= Default Icon - Override ===================================================*/ @@ -5183,7 +5183,7 @@ :-moz-any(#historyTree, #placesList, #placeContent) treechildren::-moz-tree-image(title, query, open, dayContainer), :-moz-any(#historyTree, #placesList, #placeContent) treechildren::-moz-tree-image(query, open, OrganizerQuery_history____v) { - list-style-image: url("./icons/history-reverse.svg") !important; + list-style-image: url("../icons/history-reverse.svg") !important; } /* Tag */ @@ -5191,7 +5191,7 @@ .bookmark-item[container="true"][tagContainer="true"][open="true"], :-moz-any(#placesList, #placeContent) treechildren::-moz-tree-image(title, query, open, tagContainer), :-moz-any(#placesList, #placeContent) treechildren::-moz-tree-image(query, open, OrganizerQuery_tags_______v) { - list-style-image: url("./icons/tag-open.svg") !important; + list-style-image: url("../icons/tag-open.svg") !important; } /* Boomark */ @@ -5204,13 +5204,13 @@ #bookmarksMenuPopup #bookmarksToolbarFolderMenu[open="true"], :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, open, queryFolder_toolbar_____) { - list-style-image: url("./icons/bookmarksToolbar-open.svg") !important; + list-style-image: url("../icons/bookmarksToolbar-open.svg") !important; } /* Bookmark Menu */ :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, open, queryFolder_menu________) { - list-style-image: url("./icons/bookmarksMenu-open.svg") !important; + list-style-image: url("../icons/bookmarksMenu-open.svg") !important; /* or bookmarksMenu-open2.svg" */ } @@ -5234,11 +5234,11 @@ } #viewMenu { - list-style-image: url("./icons/sort.svg") !important; + list-style-image: url("../icons/sort.svg") !important; } #maintenanceButton { - list-style-image: url("./icons/import-export.svg") !important; + list-style-image: url("../icons/import-export.svg") !important; } #clearDownloadsButton { @@ -5389,7 +5389,7 @@ } #appMenu-proton-update-banner::before { - content: url("./icons/whatsnew.svg"); + content: url("../icons/whatsnew.svg"); } #appMenu-fxa-status2::before { @@ -5487,7 +5487,7 @@ } #appMenu-zoom-controls2::before { - content: url("./icons/screenshot.svg"); + content: url("../icons/screenshot.svg"); } } #appMenu-settings-button { @@ -5505,7 +5505,7 @@ } #appMenu-quit-button2 { - list-style-image: url("./icons/quit.svg"); + list-style-image: url("../icons/quit.svg"); } } /*= Panel - Account ==========================================================*/ @@ -5553,7 +5553,7 @@ } #PanelUI-fxa-menu-sendtab-button { - list-style-image: url("./icons/send-to-device.svg"); + list-style-image: url("../icons/send-to-device.svg"); } #PanelUI-fxa-menu-sync-prefs-button { @@ -5561,7 +5561,7 @@ } #PanelUI-fxa-menu-account-signout-button { - list-style-image: url("./icons/sign-out.svg"); + list-style-image: url("../icons/sign-out.svg"); } #PanelUI-remotetabs-view-managedevices::before { @@ -5606,7 +5606,7 @@ .pageAction-sendToDevice-device.subviewbutton.sync-menuitem.sendtab-target[clientType=""], .sendToDevice-device.subviewbutton.sync-menuitem.sendtab-target[clientType=""] { - list-style-image: url("./icons/send-to-device.svg"); + list-style-image: url("../icons/send-to-device.svg"); } .pageAction-sendToDevice-device.subviewbutton.sync-menuitem.sendtab-target:not([clientType]), @@ -5645,7 +5645,7 @@ } #appMenuRestoreSession { - list-style-image: url("./icons/restore-session.svg"); + list-style-image: url("../icons/restore-session.svg"); } #appMenuClearRecentHistory { @@ -5657,11 +5657,11 @@ } #appMenu-library-recentlyClosedTabs { - list-style-image: url("./icons/movetowindow-16.svg"); + list-style-image: url("../icons/movetowindow-16.svg"); } #appMenu-library-recentlyClosedWindows { - list-style-image: url("./icons/restore-session.svg"); + list-style-image: url("../icons/restore-session.svg"); } /*= Panel - More tools =======================================================*/ @@ -5672,31 +5672,31 @@ /* Web Developer Tools */ #appmenu-developer-tools-view .subviewbutton:nth-child(1), #PanelUI-developer-tools-view .subviewbutton:nth-child(1) { - list-style-image: url("./icons/developer.svg"); + list-style-image: url("../icons/developer.svg"); } /* Task Manager */ #appmenu-developer-tools-view .subviewbutton:nth-child(2), #PanelUI-developer-tools-view .subviewbutton:nth-child(2) { - list-style-image: url("./icons/performance.svg"); + list-style-image: url("../icons/performance.svg"); } /* Remote Debugging - Edge bug.svg */ #appmenu-developer-tools-view .subviewbutton:nth-child(3), #PanelUI-developer-tools-view .subviewbutton:nth-child(3) { - list-style-image: url("./icons/bug.svg"); + list-style-image: url("../icons/bug.svg"); } /* Browser Toolbox - Edge webdeveloper.svg */ #appmenu-developer-tools-view .subviewbutton:nth-child(4), #PanelUI-developer-tools-view .subviewbutton:nth-child(4) { - list-style-image: url("./icons/window-dev-tools.svg"); + list-style-image: url("../icons/window-dev-tools.svg"); } /* Browser Content Toolbaox - */ #appmenu-developer-tools-view .subviewbutton:nth-child(5), #PanelUI-developer-tools-view .subviewbutton:nth-child(5) { - list-style-image: url("./icons/command-frames.svg"); + list-style-image: url("../icons/command-frames.svg"); } /* Browser Console */ @@ -5708,7 +5708,7 @@ /* Responsive Design Mode */ #appmenu-developer-tools-view .subviewbutton:nth-last-child(4), #PanelUI-developer-tools-view .subviewbutton:nth-last-child(4) { - list-style-image: url("./icons/command-responsivemode.svg"); + list-style-image: url("../icons/command-responsivemode.svg"); } /* Eyedropper */ @@ -5720,7 +5720,7 @@ /* Page Source - Edge file-search.svg */ #appmenu-developer-tools-view .subviewbutton:nth-last-child(2), #PanelUI-developer-tools-view .subviewbutton:nth-last-child(2) { - list-style-image: url("./icons/document-search.svg"); + list-style-image: url("../icons/document-search.svg"); } /* Extensions for Devel */ @@ -5739,7 +5739,7 @@ } #appMenu_feedbackPage { - list-style-image: url("./icons/send.svg"); + list-style-image: url("../icons/send.svg"); } #appMenu_helpSafeMode { @@ -5791,7 +5791,7 @@ /*= Tabbar - All Tab Menu ====================================================*/ #allTabsMenu-undoCloseTab { - list-style-image: url("./icons/undo.svg"); + list-style-image: url("../icons/undo.svg"); } #allTabsMenu-searchTabs { @@ -5799,11 +5799,11 @@ } #allTabsMenu-containerTabsButton { - list-style-image: url("./icons/container-openin-16.svg"); + list-style-image: url("../icons/container-openin-16.svg"); } #allTabsMenu-hiddenTabsButton { - list-style-image: url("./icons/password-hide.svg"); + list-style-image: url("../icons/password-hide.svg"); } #allTabsMenu-containerTabsView .subviewbutton:last-child { @@ -5844,7 +5844,7 @@ #protections-popup-show-report-button > .protections-popup-show-report-icon { /* chrome://browser/skin/controlcenter/dashboard.svg */ - list-style-image: url("icons/dashboard.svg"); + list-style-image: url("../icons/dashboard.svg"); } /*= identity-popup ===========================================================*/ @@ -5859,7 +5859,7 @@ } #identity-popup-clear-sitedata-button { - list-style-image: url("./icons/broom.svg"); + list-style-image: url("../icons/broom.svg"); } /*= sidebarMenu-popup ========================================================*/ @@ -5935,7 +5935,7 @@ :not(menu, #ContentSelectDropdown) > menupopup > menu:not(.menu-iconic, [type="checkbox"], [checked="true"], .in-menulist) { - list-style-image: var(--menuitem-image, url("./icons/blank.svg")) !important; + list-style-image: var(--menuitem-image, url("../icons/blank.svg")) !important; } } /* Padding */ @@ -6104,7 +6104,7 @@ menuitem:not(.menuitem-iconic, .in-menulist, [type="checkbox"], [checked="true"], .bookmark-item), menupopup:is(#menu_FilePopup, #menu_EditPopup, #menu_viewPopup, #goPopup, #historyMenuPopup, #bookmarksMenuPopup, #menu_ToolsPopup, #menu_HelpPopup) menu:not(.menu-iconic, .in-menulist, [type="checkbox"], [checked="true"]) { - list-style-image: var(--menuitem-image, url("./icons/blank.svg")); + list-style-image: var(--menuitem-image, url("../icons/blank.svg")); } */ } @@ -6215,7 +6215,7 @@ #context_reloadTab, #context_reloadSelectedTabs { - --menuitem-image: url("./icons/reload.svg"); + --menuitem-image: url("../icons/reload.svg"); } #context_toggleMuteTab, @@ -6230,17 +6230,17 @@ #context_pinTab, #context_pinSelectedTabs { - --menuitem-image: url("./icons/pin-tab.svg"); + --menuitem-image: url("../icons/pin-tab.svg"); } #context_unpinTab, #context_unpinSelectedTabs { - --menuitem-image: url("./icons/unpin-tab.svg"); + --menuitem-image: url("../icons/unpin-tab.svg"); } #context_duplicateTab, #context_duplicateTabs { - --menuitem-image: url("./icons/notebook-subsection.svg"); + --menuitem-image: url("../icons/notebook-subsection.svg"); } #context_bookmarkTab, @@ -6249,25 +6249,25 @@ } #context_moveTabOptions { - --menuitem-image: url("./icons/arrow-swap.svg"); + --menuitem-image: url("../icons/arrow-swap.svg"); } #context_sendTabToDevice { - --menuitem-image: url("./icons/send-to-device.svg"); + --menuitem-image: url("../icons/send-to-device.svg"); } #context_sendTabToDevice:is([disabled="true"]) + #context_shareTabURL, #context_sendTabToDevice:is([disabled="true"]) + menuitem.share-tab-url-item { /* At windows */ - --menuitem-image: url("./icons/share.svg"); + --menuitem-image: url("../icons/share.svg"); } #context_reopenInContainer { - --menuitem-image: url("./icons/container-openin-16.svg"); + --menuitem-image: url("../icons/container-openin-16.svg"); } #context_selectAllTabs { - --menuitem-image: url("./icons/tab-multiple.svg"); + --menuitem-image: url("../icons/tab-multiple.svg"); } #context_closeTab { @@ -6275,13 +6275,13 @@ } #context_undoCloseTab { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } /*= new-tab-button-popup =====================================================*/ #new-tab-button-popup > menuitem[command="Browser:NewUserContextTab"], .new-tab-popup > menuitem[command="Browser:NewUserContextTab"] { - --menuitem-image: url("./icons/container-openin-16.svg"); + --menuitem-image: url("../icons/container-openin-16.svg"); } #new-tab-button-popup > menuitem[command="Browser:OpenAboutContainers"], @@ -6299,7 +6299,7 @@ } .customize-context-reportExtension { - --menuitem-image: url("./icons/send.svg"); + --menuitem-image: url("../icons/send.svg"); } .customize-context-moveToPanel { @@ -6307,7 +6307,7 @@ } .toolbar-context-autohide-downloads-button { - --menuitem-image: url("./icons/password-hide.svg"); + --menuitem-image: url("../icons/password-hide.svg"); } .customize-context-removeFromToolbar { @@ -6320,7 +6320,7 @@ #toolbar-context-reloadSelectedTab, #toolbar-context-reloadSelectedTabs { - --menuitem-image: url("./icons/reload.svg"); + --menuitem-image: url("../icons/reload.svg"); } #toolbar-context-bookmarkSelectedTab, @@ -6329,16 +6329,16 @@ } #toolbar-context-selectAllTabs { - --menuitem-image: url("./icons/tab-multiple.svg"); + --menuitem-image: url("../icons/tab-multiple.svg"); } #toolbar-context-undoCloseTab { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #toggle_toolbar-menubar { /* checkbox */ - /* --menuitem-image: url("./icons/calendar-agenda.svg"); */ + /* --menuitem-image: url("../icons/calendar-agenda.svg"); */ } #toggle_PersonalToolbar { @@ -6352,33 +6352,33 @@ /*= contentAreaContextMenu ===================================================*/ #context-viewsource-goToLine { - --menuitem-image: url("./icons/text-number-format.svg"); + --menuitem-image: url("../icons/text-number-format.svg"); } #context-viewsource-wrapLongLines { /* checkbox */ - /* --menuitem-image: url("./icons/arrow-sort-down-lines.svg"); */ + /* --menuitem-image: url("../icons/arrow-sort-down-lines.svg"); */ } #context-viewsource-highlightSyntax { /* checkbox */ - /* --menuitem-image: url("./icons/code.svg"); */ + /* --menuitem-image: url("../icons/code.svg"); */ } #spell-no-suggestions { - --menuitem-image: url("./icons/text-proofing-tools.svg"); + --menuitem-image: url("../icons/text-proofing-tools.svg"); } #spell-add-to-dictionary { - --menuitem-image: url("./icons/book-add.svg"); + --menuitem-image: url("../icons/book-add.svg"); } #spell-undo-add-to-dictionary { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #context-openlinkincurrent { - --menuitem-image: url("./icons/link-square.svg"); + --menuitem-image: url("../icons/link-square.svg"); } #context-openlinkincontainertab { @@ -6390,7 +6390,7 @@ } #context-openlinkinusercontext-menu { - --menuitem-image: url("./icons/container-openin-16.svg"); + --menuitem-image: url("../icons/container-openin-16.svg"); } #context-openlink { @@ -6410,7 +6410,7 @@ } #context-savelinktopocket { - --menuitem-image: url("./icons/pocket-outline.svg"); + --menuitem-image: url("../icons/pocket-outline.svg"); } #context-copyemail { @@ -6418,11 +6418,11 @@ } #context-copylink { - --menuitem-image: url("./icons/link.svg"); + --menuitem-image: url("../icons/link.svg"); } #context-sendlinktodevice { - --menuitem-image: url("./icons/send-to-device.svg"); + --menuitem-image: url("../icons/send-to-device.svg"); } #context-media-play { @@ -6442,12 +6442,12 @@ } #context-media-playbackrate { - --menuitem-image: url("./icons/time-picker.svg"); + --menuitem-image: url("../icons/time-picker.svg"); } #context-media-loop { /* checkbox */ - /* --menuitem-image: url("./icons/arrow-repeat-all.svg"); */ + /* --menuitem-image: url("../icons/arrow-repeat-all.svg"); */ } #context-leave-dom-fullscreen { @@ -6459,15 +6459,15 @@ } #context-media-hidecontrols { - --menuitem-image: url("./icons/eye-hide.svg"); + --menuitem-image: url("../icons/eye-hide.svg"); } #context-media-showcontrols { - --menuitem-image: url("./icons/eye-show.svg"); + --menuitem-image: url("../icons/eye-show.svg"); } #context-viewvideo { - --menuitem-image: url("./icons/video.svg"); + --menuitem-image: url("../icons/video.svg"); } #context-video-pictureinpicture { @@ -6476,23 +6476,23 @@ } #context-reloadimage { - --menuitem-image: url("./icons/image-arrow-counterclockwise.svg"); + --menuitem-image: url("../icons/image-arrow-counterclockwise.svg"); } #context-viewimage { - --menuitem-image: url("./icons/image-add.svg"); + --menuitem-image: url("../icons/image-add.svg"); } #context-saveimage { - --menuitem-image: url("./icons/image.svg"); + --menuitem-image: url("../icons/image.svg"); } #context-video-saveimage { - --menuitem-image: url("./icons/video-snapshot.svg"); + --menuitem-image: url("../icons/video-snapshot.svg"); } #context-savevideo { - --menuitem-image: url("./icons/video.svg"); + --menuitem-image: url("../icons/video.svg"); } #context-saveaudio { @@ -6500,13 +6500,13 @@ } #context-copyimage-contents { - --menuitem-image: url("./icons/image-copy.svg"); + --menuitem-image: url("../icons/image-copy.svg"); } #context-copyimage, #context-copyvideourl, #context-copyaudiourl { - --menuitem-image: url("./icons/link.svg"); + --menuitem-image: url("../icons/link.svg"); } #context-sendimage, @@ -6520,11 +6520,11 @@ } #context-viewimagedesc { - --menuitem-image: url("./icons/image-alt-text.svg"); + --menuitem-image: url("../icons/image-alt-text.svg"); } #context-setDesktopBackground { - --menuitem-image: url("./icons/resize-image.svg"); + --menuitem-image: url("../icons/resize-image.svg"); } #context-ctp-play { @@ -6540,15 +6540,15 @@ } #context-pocket { - --menuitem-image: url("./icons/pocket-outline.svg"); + --menuitem-image: url("../icons/pocket-outline.svg"); } #context-sendpagetodevice { - --menuitem-image: url("./icons/send-to-device.svg"); + --menuitem-image: url("../icons/send-to-device.svg"); } #fill-login { - --menuitem-image: url("./icons/password.svg"); + --menuitem-image: url("../icons/password.svg"); } #fill-login-generated-password { @@ -6556,11 +6556,11 @@ } #manage-saved-logins { - --menuitem-image: url("./icons/key-multiple.svg"); + --menuitem-image: url("../icons/key-multiple.svg"); } #context-undo { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #context-cut { @@ -6568,7 +6568,7 @@ } #context-copy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #context-paste { @@ -6580,7 +6580,7 @@ } #context-selectall { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } #context-print-selection { @@ -6601,7 +6601,7 @@ } #frame { - --menuitem-image: url("./icons/command-frames.svg"); + --menuitem-image: url("../icons/command-frames.svg"); } #spell-check-enabled { @@ -6609,24 +6609,24 @@ } #spell-add-dictionaries-main { - --menuitem-image: url("./icons/book-add.svg"); + --menuitem-image: url("../icons/book-add.svg"); } #spell-dictionaries { - --menuitem-image: url("./icons/book.svg"); + --menuitem-image: url("../icons/book.svg"); } #context-bidi-text-direction-toggle { - --menuitem-image: url("./icons/text-direction-horizontal-ltr.svg"); + --menuitem-image: url("../icons/text-direction-horizontal-ltr.svg"); } #context-bidi-page-direction-toggle { - --menuitem-image: url("./icons/document-landscape-split-hint.svg"); + --menuitem-image: url("../icons/document-landscape-split-hint.svg"); } #context-viewpartialsource-selection, #context-viewsource { - --menuitem-image: url("./icons/document-search.svg"); + --menuitem-image: url("../icons/document-search.svg"); } #context-inspect-a11y { @@ -6634,7 +6634,7 @@ } #context-inspect { - --menuitem-image: url("./icons/command-pick.svg"); + --menuitem-image: url("../icons/command-pick.svg"); } #context-media-eme-learnmore { @@ -6651,7 +6651,7 @@ } #context-reload { - --menuitem-image: url("./icons/reload.svg"); + --menuitem-image: url("../icons/reload.svg"); } #context-stop { @@ -6664,12 +6664,12 @@ } /*= placeContext =============================================================*/ #placesContext_open { - --menuitem-image: url("./icons/link-square.svg"); + --menuitem-image: url("../icons/link-square.svg"); } #placesContext_openBookmarkContainer\:tabs, #placesContext_openBookmarkLinks\:tabs { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } #placesContext_open\:newtab, @@ -6700,11 +6700,11 @@ } #placesContext_deleteHost { - --menuitem-image: url("./icons/eye-hide.svg"); + --menuitem-image: url("../icons/eye-hide.svg"); } #placesContext_sortBy\:name { - --menuitem-image: url("./icons/text-sort-ascending.svg"); + --menuitem-image: url("../icons/text-sort-ascending.svg"); } #placesContext_cut { @@ -6712,7 +6712,7 @@ } #placesContext_copy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #placesContext_paste_group { @@ -6728,12 +6728,12 @@ } @supports -moz-bool-pref("userChrome.icon.library") { #placesContext_new\:folder { - --menuitem-image: url("./icons/folder.svg"); + --menuitem-image: url("../icons/folder.svg"); } } #placesContext_new\:separator { - --menuitem-image: url("./icons/vertical-line.svg"); + --menuitem-image: url("../icons/vertical-line.svg"); } #placesContext_paste { @@ -6746,7 +6746,7 @@ #show-other-bookmarks_PersonalToolbar { /* checkbox */ - /* --menuitem-image: url("./icons/star-line-horizontal.svg"); */ + /* --menuitem-image: url("../icons/star-line-horizontal.svg"); */ } #placesContext_showAllBookmarks { @@ -6754,7 +6754,7 @@ } .openintabs-menuitem { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } /*= blockedPopupOptions ======================================================*/ @@ -6782,7 +6782,7 @@ /*= pictureInPictureToggleContextMenu ========================================*/ #pictureInPictureToggleContextMenu > menuitem[oncommand="PictureInPicture.hideToggle();"] { - --menuitem-image: url("./icons/eye-hide.svg"); + --menuitem-image: url("../icons/eye-hide.svg"); } /*= pageActionContextMenu ====================================================*/ @@ -6796,7 +6796,7 @@ /*= customizationPanelItemContextMenu ========================================*/ #customizationPanelItemContextMenuUnpin { - --menuitem-image: url("./icons/unpin-tab.svg"); + --menuitem-image: url("../icons/unpin-tab.svg"); } .customize-context-removeFromPanel { @@ -6832,7 +6832,7 @@ } .downloadUnblockMenuItem { - --menuitem-image: url("./icons/checkmark-circle.svg"); + --menuitem-image: url("../icons/checkmark-circle.svg"); } .downloadUseSystemDefaultMenuItem { @@ -6848,16 +6848,16 @@ } @supports -moz-bool-pref("userChrome.icon.library") { .downloadShowMenuItem { - --menuitem-image: url("./icons/folder.svg"); + --menuitem-image: url("../icons/folder.svg"); } } #downloadsContextMenu > menuitem[command="downloadsCmd_openReferrer"] { - --menuitem-image: url("./icons/link-square.svg"); + --menuitem-image: url("../icons/link-square.svg"); } #downloadsContextMenu > menuitem[command="downloadsCmd_copyLocation"] { - --menuitem-image: url("./icons/link.svg"); + --menuitem-image: url("../icons/link.svg"); } .downloadDeleteFileMenuItem { @@ -6865,17 +6865,17 @@ } .downloadRemoveFromHistoryMenuItem { - --menuitem-image: url("./icons/eraser.svg"); + --menuitem-image: url("../icons/eraser.svg"); } #downloadsContextMenu > menuitem[command="downloadsCmd_clearList"], #downloadsContextMenu > menuitem[command="downloadsCmd_clearDownloads"] { - --menuitem-image: url("./icons/broom.svg"); + --menuitem-image: url("../icons/broom.svg"); } /*= SyncedTabsSidebarContext =================================================*/ #syncedTabsOpenSelected { - --menuitem-image: url("./icons/link-square.svg"); + --menuitem-image: url("../icons/link-square.svg"); } #syncedTabsOpenSelectedInTab { @@ -6895,11 +6895,11 @@ } #syncedTabsCopySelected { - --menuitem-image: url("./icons/link.svg"); + --menuitem-image: url("../icons/link.svg"); } #syncedTabsOpenAllInTabs { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } #syncedTabsManageDevices { @@ -6912,7 +6912,7 @@ /*= SyncedTabsSidebarTabsFilterContext =======================================*/ #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_undo"] { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_cut"] { @@ -6920,7 +6920,7 @@ } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_copy"] { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_paste"] { @@ -6932,7 +6932,7 @@ } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_selectAll"] { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } #syncedTabsRefreshFilter { @@ -6941,7 +6941,7 @@ /*= urlbar-input-container ===================================================*/ #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_undo"] { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_cut"] { @@ -6949,7 +6949,7 @@ } #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_copy"] { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_paste"] { @@ -6961,13 +6961,13 @@ } #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_selectAll"] { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } /*= textbox-contextmenu ======================================================*/ /* Browser's Searchbar, Libray's Searchbar, Page Info */ .textbox-contextmenu > menuitem[data-l10n-id="text-action-undo"] { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } .textbox-contextmenu > menuitem[data-l10n-id="text-action-cut"] { @@ -6975,7 +6975,7 @@ } .textbox-contextmenu > menuitem[data-l10n-id="text-action-copy"] { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } .textbox-contextmenu > menuitem[data-l10n-id="text-action-paste"] { @@ -6987,7 +6987,7 @@ } .textbox-contextmenu > menuitem[data-l10n-id="text-action-select-all"] { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } /* Only searchbar */ @@ -7023,7 +7023,7 @@ menupopup:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup) > .sync-menuitem.sendtab-target[clientType=""] { - --menuitem-image: url("./icons/send-to-device.svg"); + --menuitem-image: url("../icons/send-to-device.svg"); } menupopup:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup) @@ -7034,7 +7034,7 @@ @supports -moz-bool-pref("userChrome.icon.global_menubar") { /*= main-menubar =============================================================*/ #file-menu { - --menuitem-image: url("./icons/mail-inbox-all.svg"); + --menuitem-image: url("../icons/mail-inbox-all.svg"); } #edit-menu { @@ -7042,7 +7042,7 @@ } #view-menu { - --menuitem-image: url("./icons/content-view.svg"); + --menuitem-image: url("../icons/content-view.svg"); } #history-menu { @@ -7054,7 +7054,7 @@ } #tools-menu { - --menuitem-image: url("./icons/toolbox.svg"); + --menuitem-image: url("../icons/toolbox.svg"); } #helpMenu { @@ -7097,7 +7097,7 @@ } #menu_FileQuitItem { - --menuitem-image: url("./icons/quit.svg"); + --menuitem-image: url("../icons/quit.svg"); } /* Mange Containers */ @@ -7107,7 +7107,7 @@ /*= menu_EditPopup ===========================================================*/ #menu_undo { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #menu_cut { @@ -7115,7 +7115,7 @@ } #menu_copy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #menu_paste { @@ -7127,7 +7127,7 @@ } #menu_selectAll { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } #menu_find { @@ -7140,7 +7140,7 @@ /*= menu_viewPopup ===========================================================*/ #viewToolbarsMenu { - --menuitem-image: url("./icons/toolbar.svg"); + --menuitem-image: url("../icons/toolbar.svg"); } #viewSidebarMenuMenu { @@ -7148,11 +7148,11 @@ } #viewFullZoomMenu { - --menuitem-image: url("./icons/screenshot.svg"); + --menuitem-image: url("../icons/screenshot.svg"); } #pageStyleMenu { - --menuitem-image: url("./icons/document-css.svg"); + --menuitem-image: url("../icons/document-css.svg"); } #repair-text-encoding { @@ -7168,7 +7168,7 @@ } #documentDirection-swap { - --menuitem-image: url("./icons/text-direction-horizontal-ltr.svg"); + --menuitem-image: url("../icons/text-direction-horizontal-ltr.svg"); } /* view-menu-popup sub menu */ @@ -7186,7 +7186,7 @@ } #menu_zoomReset { - --menuitem-image: url("./icons/resize.svg"); + --menuitem-image: url("../icons/resize.svg"); } /*= goPopup ==================================================================*/ @@ -7203,7 +7203,7 @@ } #historyRestoreLastSession { - --menuitem-image: url("./icons/restore-session.svg"); + --menuitem-image: url("../icons/restore-session.svg"); } #historyUndoMenu { @@ -7216,11 +7216,11 @@ /* sub menu */ #historyUndoPopup .restoreallitem { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } #historyUndoWindowPopup .restoreallitem { - --menuitem-image: url("./icons/restore-session.svg"); + --menuitem-image: url("../icons/restore-session.svg"); } /*= bookmarksMenuPopup =======================================================*/ @@ -7256,28 +7256,28 @@ #webDeveloperMenu, #browserToolsMenu { - --menuitem-image: url("./icons/developer.svg"); + --menuitem-image: url("../icons/developer.svg"); } #menu_pageInfo { - --menuitem-image: url("./icons/document-endnote.svg"); + --menuitem-image: url("../icons/document-endnote.svg"); } /* menuWebDeveloperPopup sub menu */ #menu_taskManager { - --menuitem-image: url("./icons/performance.svg"); + --menuitem-image: url("../icons/performance.svg"); } #menu_devtools_remotedebugging { - --menuitem-image: url("./icons/bug.svg"); + --menuitem-image: url("../icons/bug.svg"); } #menu_browserToolbox { - --menuitem-image: url("./icons/window-dev-tools.svg"); + --menuitem-image: url("../icons/window-dev-tools.svg"); } #menu_browserContentToolbox { - --menuitem-image: url("./icons/command-frames.svg"); + --menuitem-image: url("../icons/command-frames.svg"); } #menu_browserConsole { @@ -7285,7 +7285,7 @@ } #menu_pageSource { - --menuitem-image: url("./icons/document-search.svg"); + --menuitem-image: url("../icons/document-search.svg"); } #extensionsForDevelopers { @@ -7298,7 +7298,7 @@ } #feedbackPage { - --menuitem-image: url("./icons/send.svg"); + --menuitem-image: url("../icons/send.svg"); } #helpSafeMode { @@ -7335,16 +7335,16 @@ } @supports -moz-bool-pref("userChrome.icon.library") { #newfolder { - --menuitem-image: url("./icons/folder.svg"); + --menuitem-image: url("../icons/folder.svg"); } } #newseparator { - --menuitem-image: url("./icons/vertical-line.svg"); + --menuitem-image: url("../icons/vertical-line.svg"); } #orgUndo { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #orgCut { @@ -7352,7 +7352,7 @@ } #orgCopy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #orgPaste { @@ -7364,7 +7364,7 @@ } #orgSelectAll { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } #orgClose { @@ -7377,7 +7377,7 @@ } #viewSort { - --menuitem-image: url("./icons/text-sort-ascending.svg"); + --menuitem-image: url("../icons/text-sort-ascending.svg"); } /*= maintenanceButtonPopup ===================================================*/ @@ -7401,16 +7401,16 @@ /*= Waterfox =================================================================*/ @supports -moz-bool-pref("userChrome.icon.panel") { #appMenu-restart-button { - list-style-image: url("./icons/refresh-cw.svg") !important; + list-style-image: url("../icons/refresh-cw.svg") !important; } } @supports -moz-bool-pref("userChrome.icon.menu") { #menu_FileRestartItem { - --menuitem-image: url("./icons/refresh-cw.svg"); + --menuitem-image: url("../icons/refresh-cw.svg"); } menuitem.privatetab-icon { - --menuitem-image: url("./icons/private-favicon.svg"); + --menuitem-image: url("../icons/private-favicon.svg"); } } @supports -moz-bool-pref("userChrome.theme.fully_color") { diff --git a/css/leptonContent.css b/css/leptonContent.css index 32ac480..850664e 100644 --- a/css/leptonContent.css +++ b/css/leptonContent.css @@ -192,11 +192,11 @@ } @supports -moz-bool-pref("userContent.player.icon") { #controlsContainer .fullscreenButton { - background-image: url("./icons/enter-fullscreen.svg") !important; + background-image: url("../icons/enter-fullscreen.svg") !important; } #controlsContainer .fullscreenButton[fullscreened] { - background-image: url("./icons/exit-fullscreen.svg") !important; + background-image: url("../icons/exit-fullscreen.svg") !important; } } @supports -moz-bool-pref("userContent.player.noaudio") { @@ -496,12 +496,12 @@ url("about:restartrequired"), url("chrome://browser/content/aboutRestartRequired.xhtml") { #errorPageContainer { - background-image: url("./icons/error-connection-failure.svg"); + background-image: url("../icons/error-connection-failure.svg"); } } @-moz-document url-prefix("about:neterror?e=dnsNotFound") { #errorPageContainer { - background-image: url("./icons/error-server-not-found.svg"); + background-image: url("../icons/error-server-not-found.svg"); } } @-moz-document url-prefix("about:neterror?e=malformedURI") { @@ -512,14 +512,14 @@ @-moz-document url-prefix("about:neterror?e=clockSkewError"), url-prefix("about:neterror?e=nssFailure") { #errorPageContainer { - background-image: url("./icons/blue-berror.svg"); + background-image: url("../icons/blue-berror.svg"); background-size: 18.5em; } } @-moz-document url("about:sessionrestore"), url("chrome://browser/content/aboutSessionRestore.xhtml") { .description-wrapper { - background-image: url("./icons/error-session-restore.svg"); + background-image: url("../icons/error-session-restore.svg"); } } @-moz-document url-prefix("about:neterror?e=fileNotFound") { @@ -551,7 +551,7 @@ { @media (min-width: 970px) { .title { - background-image: url("./icons/welcome-back.svg") !important; + background-image: url("../icons/welcome-back.svg") !important; } } } @@ -1827,7 +1827,7 @@ #editBMPanel_folderMenuList:not([selectedGuid="toolbar_____"], [selectedGuid="menu________"]), #editBMPanel_folderMenuList .folder-icon:not([id]), .downloadIconShow > .button-box > .button-icon { - list-style-image: url("./icons/folder.svg") !important; + list-style-image: url("../icons/folder.svg") !important; } /* Standard Folder - Open */ @@ -1835,7 +1835,7 @@ .bookmark-item[container="true"]:not([query="true"], [tagContainer], [dayContainer])[open="true"], :-moz-any(#bookmarks-view, #historyTree, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(title, container, open) { - list-style-image: url("./icons/folder-open.svg") !important; + list-style-image: url("../icons/folder-open.svg") !important; } /*= Other Folder - Inbox Icon ================================================*/ @@ -1849,7 +1849,7 @@ treechildren::-moz-tree-image(container, queryFolder_unfiled_____), #editBMPanel_unfiledRootItem, #editBMPanel_folderMenuList[selectedGuid="unfiled_____"] { - list-style-image: url("./icons/mail-inbox-all.svg") !important; + list-style-image: url("../icons/mail-inbox-all.svg") !important; } /* Other Folder - Open */ @@ -1860,7 +1860,7 @@ treechildren::-moz-tree-image(container, open, OrganizerQuery_UnfiledBookmarks), :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, open, queryFolder_unfiled_____) { - list-style-image: url("./icons/mail-inbox.svg") !important; + list-style-image: url("../icons/mail-inbox.svg") !important; } /*= Default Icon - Override ===================================================*/ @@ -1921,7 +1921,7 @@ treechildren::-moz-tree-image(title, query, open, dayContainer), :-moz-any(#historyTree, #placesList, #placeContent) treechildren::-moz-tree-image(query, open, OrganizerQuery_history____v) { - list-style-image: url("./icons/history-reverse.svg") !important; + list-style-image: url("../icons/history-reverse.svg") !important; } /* Tag */ @@ -1929,7 +1929,7 @@ .bookmark-item[container="true"][tagContainer="true"][open="true"], :-moz-any(#placesList, #placeContent) treechildren::-moz-tree-image(title, query, open, tagContainer), :-moz-any(#placesList, #placeContent) treechildren::-moz-tree-image(query, open, OrganizerQuery_tags_______v) { - list-style-image: url("./icons/tag-open.svg") !important; + list-style-image: url("../icons/tag-open.svg") !important; } /* Boomark */ @@ -1942,13 +1942,13 @@ #bookmarksMenuPopup #bookmarksToolbarFolderMenu[open="true"], :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, open, queryFolder_toolbar_____) { - list-style-image: url("./icons/bookmarksToolbar-open.svg") !important; + list-style-image: url("../icons/bookmarksToolbar-open.svg") !important; } /* Bookmark Menu */ :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, open, queryFolder_menu________) { - list-style-image: url("./icons/bookmarksMenu-open.svg") !important; + list-style-image: url("../icons/bookmarksMenu-open.svg") !important; /* or bookmarksMenu-open2.svg" */ } @@ -1969,11 +1969,11 @@ } #viewMenu { - list-style-image: url("./icons/sort.svg") !important; + list-style-image: url("../icons/sort.svg") !important; } #maintenanceButton { - list-style-image: url("./icons/import-export.svg") !important; + list-style-image: url("../icons/import-export.svg") !important; } #clearDownloadsButton { @@ -2146,12 +2146,12 @@ /* Icon lists */ /*= placeContext =============================================================*/ #placesContext_open { - --menuitem-image: url("./icons/link-square.svg"); + --menuitem-image: url("../icons/link-square.svg"); } #placesContext_openBookmarkContainer\:tabs, #placesContext_openBookmarkLinks\:tabs { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } #placesContext_open\:newtab, @@ -2182,11 +2182,11 @@ } #placesContext_deleteHost { - --menuitem-image: url("./icons/eye-hide.svg"); + --menuitem-image: url("../icons/eye-hide.svg"); } #placesContext_sortBy\:name { - --menuitem-image: url("./icons/text-sort-ascending.svg"); + --menuitem-image: url("../icons/text-sort-ascending.svg"); } #placesContext_cut { @@ -2194,7 +2194,7 @@ } #placesContext_copy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #placesContext_paste_group { @@ -2210,12 +2210,12 @@ } @supports -moz-bool-pref("userChrome.icon.library") { #placesContext_new\:folder { - --menuitem-image: url("./icons/folder.svg"); + --menuitem-image: url("../icons/folder.svg"); } } #placesContext_new\:separator { - --menuitem-image: url("./icons/vertical-line.svg"); + --menuitem-image: url("../icons/vertical-line.svg"); } #placesContext_paste { @@ -2228,7 +2228,7 @@ #show-other-bookmarks_PersonalToolbar { /* checkbox */ - /* --menuitem-image: url("./icons/star-line-horizontal.svg"); */ + /* --menuitem-image: url("../icons/star-line-horizontal.svg"); */ } #placesContext_showAllBookmarks { @@ -2236,7 +2236,7 @@ } .openintabs-menuitem { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } /*= organizeButtonPopup ======================================================*/ @@ -2249,16 +2249,16 @@ } @supports -moz-bool-pref("userChrome.icon.library") { #newfolder { - --menuitem-image: url("./icons/folder.svg"); + --menuitem-image: url("../icons/folder.svg"); } } #newseparator { - --menuitem-image: url("./icons/vertical-line.svg"); + --menuitem-image: url("../icons/vertical-line.svg"); } #orgUndo { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #orgCut { @@ -2266,7 +2266,7 @@ } #orgCopy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #orgPaste { @@ -2278,7 +2278,7 @@ } #orgSelectAll { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } #orgClose { @@ -2291,7 +2291,7 @@ } #viewSort { - --menuitem-image: url("./icons/text-sort-ascending.svg"); + --menuitem-image: url("../icons/text-sort-ascending.svg"); } /*= maintenanceButtonPopup ===================================================*/ diff --git a/src/contents/_error_page.scss b/src/contents/_error_page.scss index 40e4871..b17bc95 100644 --- a/src/contents/_error_page.scss +++ b/src/contents/_error_page.scss @@ -40,12 +40,12 @@ url("about:restartrequired"), url("chrome://browser/content/aboutRestartRequired.xhtml") { #errorPageContainer { - background-image: url("./icons/error-connection-failure.svg"); + background-image: url("../icons/error-connection-failure.svg"); } } @-moz-document url-prefix("about:neterror?e=dnsNotFound") { #errorPageContainer { - background-image: url("./icons/error-server-not-found.svg"); + background-image: url("../icons/error-server-not-found.svg"); } } @-moz-document url-prefix("about:neterror?e=malformedURI") { @@ -56,7 +56,7 @@ @-moz-document url-prefix("about:neterror?e=clockSkewError"), url-prefix("about:neterror?e=nssFailure") { #errorPageContainer { - background-image: url("./icons/blue-berror.svg"); + background-image: url("../icons/blue-berror.svg"); background-size: 18.5em; } } @@ -64,7 +64,7 @@ @-moz-document url("about:sessionrestore"), url("chrome://browser/content/aboutSessionRestore.xhtml") { .description-wrapper { - background-image: url("./icons/error-session-restore.svg"); + background-image: url("../icons/error-session-restore.svg"); } } @@ -98,7 +98,7 @@ { @media (min-width: 970px) { .title { - background-image: url("./icons/welcome-back.svg") !important; + background-image: url("../icons/welcome-back.svg") !important; } } } diff --git a/src/contents/_video_player.scss b/src/contents/_video_player.scss index 29604e4..c6c60cd 100644 --- a/src/contents/_video_player.scss +++ b/src/contents/_video_player.scss @@ -173,10 +173,10 @@ @include Option("userContent.player.icon") { #controlsContainer .fullscreenButton { - background-image: url("./icons/enter-fullscreen.svg") !important; + background-image: url("../icons/enter-fullscreen.svg") !important; } #controlsContainer .fullscreenButton[fullscreened] { - background-image: url("./icons/exit-fullscreen.svg") !important; + background-image: url("../icons/exit-fullscreen.svg") !important; } } diff --git a/src/icons/_global_menu.scss b/src/icons/_global_menu.scss index 3068db4..99b12c1 100644 --- a/src/icons/_global_menu.scss +++ b/src/icons/_global_menu.scss @@ -45,7 +45,7 @@ #goOfflineMenuitem { } #menu_FileQuitItem { - --menuitem-image: url("./icons/quit.svg"); + --menuitem-image: url("../icons/quit.svg"); } /* Mange Containers */ @@ -55,7 +55,7 @@ /*= menu_EditPopup ===========================================================*/ #menu_undo { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #menu_redo { } @@ -64,7 +64,7 @@ --menuitem-image: url("chrome://browser/skin/edit-cut.svg"); } #menu_copy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #menu_paste { --menuitem-image: url("chrome://browser/skin/edit-paste.svg"); @@ -74,7 +74,7 @@ } #menu_selectAll { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } #menu_find { @@ -92,17 +92,17 @@ /*= menu_viewPopup ===========================================================*/ #viewToolbarsMenu { - --menuitem-image: url("./icons/toolbar.svg"); + --menuitem-image: url("../icons/toolbar.svg"); } #viewSidebarMenuMenu { --menuitem-image: url("chrome://browser/skin/sidebars.svg"); } #viewFullZoomMenu { - --menuitem-image: url("./icons/screenshot.svg"); + --menuitem-image: url("../icons/screenshot.svg"); } #pageStyleMenu { - --menuitem-image: url("./icons/document-css.svg"); + --menuitem-image: url("../icons/document-css.svg"); } #repair-text-encoding { --menuitem-image: url("chrome://browser/skin/characterEncoding.svg"); @@ -118,7 +118,7 @@ } #documentDirection-swap { - --menuitem-image: url("./icons/text-direction-horizontal-ltr.svg"); + --menuitem-image: url("../icons/text-direction-horizontal-ltr.svg"); } /* view-menu-popup sub menu */ @@ -134,7 +134,7 @@ --menuitem-image: url("chrome://browser/skin/subtract-circle-fill.svg"); } #menu_zoomReset { - --menuitem-image: url("./icons/resize.svg"); + --menuitem-image: url("../icons/resize.svg"); } /*= goPopup ==================================================================*/ @@ -149,7 +149,7 @@ --menuitem-image: url("chrome://browser/skin/sync.svg"); } #historyRestoreLastSession { - --menuitem-image: url("./icons/restore-session.svg"); + --menuitem-image: url("../icons/restore-session.svg"); } #hiddenTabsMenu { } @@ -162,10 +162,10 @@ /* sub menu */ #historyUndoPopup .restoreallitem { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } #historyUndoWindowPopup .restoreallitem { - --menuitem-image: url("./icons/restore-session.svg"); + --menuitem-image: url("../icons/restore-session.svg"); } /*= bookmarksMenuPopup =======================================================*/ @@ -210,10 +210,10 @@ #webDeveloperMenu, /* Legacy */ #browserToolsMenu { - --menuitem-image: url("./icons/developer.svg"); + --menuitem-image: url("../icons/developer.svg"); } #menu_pageInfo { - --menuitem-image: url("./icons/document-endnote.svg"); + --menuitem-image: url("../icons/document-endnote.svg"); } /* menuWebDeveloperPopup sub menu */ @@ -222,16 +222,16 @@ #menu_devToolbox { } #menu_taskManager { - --menuitem-image: url("./icons/performance.svg"); + --menuitem-image: url("../icons/performance.svg"); } #menu_devtools_remotedebugging { - --menuitem-image: url("./icons/bug.svg"); + --menuitem-image: url("../icons/bug.svg"); } #menu_browserToolbox { - --menuitem-image: url("./icons/window-dev-tools.svg"); + --menuitem-image: url("../icons/window-dev-tools.svg"); } #menu_browserContentToolbox { - --menuitem-image: url("./icons/command-frames.svg"); + --menuitem-image: url("../icons/command-frames.svg"); } #menu_browserConsole { --menuitem-image: url("chrome://devtools/skin/images/command-console.svg"); @@ -241,7 +241,7 @@ #menu_eyedropper { } #menu_pageSource { - --menuitem-image: url("./icons/document-search.svg"); + --menuitem-image: url("../icons/document-search.svg"); } #extensionsForDevelopers { --menuitem-image: url("chrome://devtools/skin/images/debugging-addons.svg"); @@ -252,7 +252,7 @@ --menuitem-image: url("chrome://global/skin/icons/help.svg"); } #feedbackPage { - --menuitem-image: url("./icons/send.svg"); + --menuitem-image: url("../icons/send.svg"); } #helpSafeMode { --menuitem-image: url("chrome://devtools/skin/images/debugging-workers.svg"); diff --git a/src/icons/_library.scss b/src/icons/_library.scss index 136d2e2..fc2b57b 100644 --- a/src/icons/_library.scss +++ b/src/icons/_library.scss @@ -5,15 +5,15 @@ #newfolder { --menuitem-image: url("chrome://global/skin/icons/folder.svg"); @include Option("userChrome.icon.library") { - --menuitem-image: url("./icons/folder.svg"); + --menuitem-image: url("../icons/folder.svg"); } } #newseparator { - --menuitem-image: url("./icons/vertical-line.svg"); + --menuitem-image: url("../icons/vertical-line.svg"); } #orgUndo { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #orgRedo { } @@ -22,7 +22,7 @@ --menuitem-image: url("chrome://browser/skin/edit-cut.svg"); } #orgCopy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #orgPaste { --menuitem-image: url("chrome://browser/skin/edit-paste.svg"); @@ -32,7 +32,7 @@ } #orgSelectAll { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } #orgClose { @@ -44,7 +44,7 @@ --menuitem-image: url("chrome://global/skin/icons/columnpicker.svg"); } #viewSort { - --menuitem-image: url("./icons/text-sort-ascending.svg"); + --menuitem-image: url("../icons/text-sort-ascending.svg"); } /*= maintenanceButtonPopup ===================================================*/ diff --git a/src/icons/_main_menubar.scss b/src/icons/_main_menubar.scss index ff5e21c..33b26c7 100644 --- a/src/icons/_main_menubar.scss +++ b/src/icons/_main_menubar.scss @@ -1,12 +1,12 @@ /*= main-menubar =============================================================*/ #file-menu { - --menuitem-image: url("./icons/mail-inbox-all.svg"); + --menuitem-image: url("../icons/mail-inbox-all.svg"); } #edit-menu { --menuitem-image: url("chrome://global/skin/icons/edit.svg"); } #view-menu { - --menuitem-image: url("./icons/content-view.svg"); + --menuitem-image: url("../icons/content-view.svg"); } #history-menu { --menuitem-image: url("chrome://browser/skin/history.svg"); @@ -15,7 +15,7 @@ --menuitem-image: url("chrome://browser/skin/bookmark.svg"); } #tools-menu { - --menuitem-image: url("./icons/toolbox.svg"); + --menuitem-image: url("../icons/toolbox.svg"); } #helpMenu { --menuitem-image: url("chrome://global/skin/icons/help.svg"); diff --git a/src/icons/_panel.scss b/src/icons/_panel.scss index a26dae0..a299aa4 100644 --- a/src/icons/_panel.scss +++ b/src/icons/_panel.scss @@ -6,7 +6,7 @@ } #appMenu-proton-update-banner::before { - content: url("./icons/whatsnew.svg"); + content: url("../icons/whatsnew.svg"); } #appMenu-fxa-status2::before { /* Don't exist img tag */ @@ -92,7 +92,7 @@ list-style-image: url("chrome://global/skin/icons/search-glass.svg"); } #appMenu-zoom-controls2::before { - content: url("./icons/screenshot.svg"); + content: url("../icons/screenshot.svg"); } } @@ -110,7 +110,7 @@ } #appMenu-quit-button2 { - list-style-image: url("./icons/quit.svg"); + list-style-image: url("../icons/quit.svg"); } } @@ -155,13 +155,13 @@ list-style-image: url("chrome://browser/skin/fxa/add-device.svg"); } #PanelUI-fxa-menu-sendtab-button { - list-style-image: url("./icons/send-to-device.svg"); + list-style-image: url("../icons/send-to-device.svg"); } #PanelUI-fxa-menu-sync-prefs-button { list-style-image: url("chrome://global/skin/icons/settings.svg"); } #PanelUI-fxa-menu-account-signout-button { - list-style-image: url("./icons/sign-out.svg"); + list-style-image: url("../icons/sign-out.svg"); } #PanelUI-remotetabs-view-managedevices::before { /* Box */ @@ -202,7 +202,7 @@ } .pageAction-sendToDevice-device.subviewbutton.sync-menuitem.sendtab-target[clientType=""], /* Legacy */ .sendToDevice-device.subviewbutton.sync-menuitem.sendtab-target[clientType=""] { - list-style-image: url("./icons/send-to-device.svg"); + list-style-image: url("../icons/send-to-device.svg"); } .pageAction-sendToDevice-device.subviewbutton.sync-menuitem.sendtab-target:not([clientType]), /* Legacy */ .sendToDevice-device.subviewbutton.sync-menuitem.sendtab-target:not([clientType]) { @@ -236,7 +236,7 @@ panelMenuBookmarkThisPage[starred] { list-style-image: url("chrome://browser/skin/window.svg"); } #appMenuRestoreSession { - list-style-image: url("./icons/restore-session.svg"); + list-style-image: url("../icons/restore-session.svg"); } #appMenuClearRecentHistory { list-style-image: url("chrome://browser/skin/forget.svg"); @@ -247,10 +247,10 @@ panelMenuBookmarkThisPage[starred] { } #appMenu-library-recentlyClosedTabs { - list-style-image: url("./icons/movetowindow-16.svg"); + list-style-image: url("../icons/movetowindow-16.svg"); } #appMenu-library-recentlyClosedWindows { - list-style-image: url("./icons/restore-session.svg"); + list-style-image: url("../icons/restore-session.svg"); } /*= Panel - More tools =======================================================*/ @@ -261,27 +261,27 @@ panelMenuBookmarkThisPage[starred] { /* Web Developer Tools */ #appmenu-developer-tools-view .subviewbutton:nth-child(1), #PanelUI-developer-tools-view .subviewbutton:nth-child(1) { - list-style-image: url("./icons/developer.svg"); + list-style-image: url("../icons/developer.svg"); } /* Task Manager */ #appmenu-developer-tools-view .subviewbutton:nth-child(2), #PanelUI-developer-tools-view .subviewbutton:nth-child(2) { - list-style-image: url("./icons/performance.svg"); + list-style-image: url("../icons/performance.svg"); } /* Remote Debugging - Edge bug.svg */ #appmenu-developer-tools-view .subviewbutton:nth-child(3), #PanelUI-developer-tools-view .subviewbutton:nth-child(3) { - list-style-image: url("./icons/bug.svg"); + list-style-image: url("../icons/bug.svg"); } /* Browser Toolbox - Edge webdeveloper.svg */ #appmenu-developer-tools-view .subviewbutton:nth-child(4), #PanelUI-developer-tools-view .subviewbutton:nth-child(4) { - list-style-image: url("./icons/window-dev-tools.svg"); + list-style-image: url("../icons/window-dev-tools.svg"); } /* Browser Content Toolbaox - */ #appmenu-developer-tools-view .subviewbutton:nth-child(5), #PanelUI-developer-tools-view .subviewbutton:nth-child(5) { - list-style-image: url("./icons/command-frames.svg"); + list-style-image: url("../icons/command-frames.svg"); } /* Browser Console */ #appmenu-developer-tools-view .subviewbutton:nth-last-child(5), @@ -291,7 +291,7 @@ panelMenuBookmarkThisPage[starred] { /* Responsive Design Mode */ #appmenu-developer-tools-view .subviewbutton:nth-last-child(4), #PanelUI-developer-tools-view .subviewbutton:nth-last-child(4) { - list-style-image: url("./icons/command-responsivemode.svg"); + list-style-image: url("../icons/command-responsivemode.svg"); } /* Eyedropper */ #appmenu-developer-tools-view .subviewbutton:nth-last-child(3), @@ -301,7 +301,7 @@ panelMenuBookmarkThisPage[starred] { /* Page Source - Edge file-search.svg */ #appmenu-developer-tools-view .subviewbutton:nth-last-child(2), #PanelUI-developer-tools-view .subviewbutton:nth-last-child(2) { - list-style-image: url("./icons/document-search.svg"); + list-style-image: url("../icons/document-search.svg"); } /* Extensions for Devel */ #appmenu-developer-tools-view .subviewbutton:nth-last-child(1), @@ -317,7 +317,7 @@ panelMenuBookmarkThisPage[starred] { list-style-image: url("chrome://global/skin/icons/help.svg"); } #appMenu_feedbackPage { - list-style-image: url("./icons/send.svg"); + list-style-image: url("../icons/send.svg"); } #appMenu_helpSafeMode { list-style-image: url("chrome://devtools/skin/images/debugging-workers.svg"); @@ -361,17 +361,17 @@ panelMenuBookmarkThisPage[starred] { /*= Tabbar - All Tab Menu ====================================================*/ #allTabsMenu-undoCloseTab { - list-style-image: url("./icons/undo.svg"); + list-style-image: url("../icons/undo.svg"); } #allTabsMenu-searchTabs { list-style-image: url("chrome://global/skin/icons/search-glass.svg"); } #allTabsMenu-containerTabsButton { - list-style-image: url("./icons/container-openin-16.svg"); + list-style-image: url("../icons/container-openin-16.svg"); } #allTabsMenu-hiddenTabsButton { - list-style-image: url("./icons/password-hide.svg"); + list-style-image: url("../icons/password-hide.svg"); } #allTabsMenu-containerTabsView .subviewbutton:last-child { @@ -413,7 +413,7 @@ panelMenuBookmarkThisPage[starred] { #protections-popup-show-report-button > .protections-popup-show-report-icon { /* chrome://browser/skin/controlcenter/dashboard.svg */ - list-style-image: url("icons/dashboard.svg"); + list-style-image: url("../icons/dashboard.svg"); } /*= identity-popup ===========================================================*/ @@ -427,7 +427,7 @@ panelMenuBookmarkThisPage[starred] { } #identity-popup-clear-sitedata-button { - list-style-image: url("./icons/broom.svg"); + list-style-image: url("../icons/broom.svg"); } /*= sidebarMenu-popup ========================================================*/ diff --git a/src/icons/_waterfox.scss b/src/icons/_waterfox.scss index 6ab6aaf..f1bbee1 100644 --- a/src/icons/_waterfox.scss +++ b/src/icons/_waterfox.scss @@ -1,14 +1,14 @@ @include Option("userChrome.icon.panel") { #appMenu-restart-button { - list-style-image: url("./icons/refresh-cw.svg") !important; + list-style-image: url("../icons/refresh-cw.svg") !important; } } @include Option("userChrome.icon.menu") { #menu_FileRestartItem { - --menuitem-image: url("./icons/refresh-cw.svg"); + --menuitem-image: url("../icons/refresh-cw.svg"); } menuitem.privatetab-icon { - --menuitem-image: url("./icons/private-favicon.svg"); + --menuitem-image: url("../icons/private-favicon.svg"); } } diff --git a/src/icons/context_menu/_content_area.scss b/src/icons/context_menu/_content_area.scss index 208db9c..903bc43 100644 --- a/src/icons/context_menu/_content_area.scss +++ b/src/icons/context_menu/_content_area.scss @@ -1,29 +1,29 @@ /*= contentAreaContextMenu ===================================================*/ #context-viewsource-goToLine { - --menuitem-image: url("./icons/text-number-format.svg"); + --menuitem-image: url("../icons/text-number-format.svg"); } #context-viewsource-wrapLongLines { /* checkbox */ - /* --menuitem-image: url("./icons/arrow-sort-down-lines.svg"); */ + /* --menuitem-image: url("../icons/arrow-sort-down-lines.svg"); */ } #context-viewsource-highlightSyntax { /* checkbox */ - /* --menuitem-image: url("./icons/code.svg"); */ + /* --menuitem-image: url("../icons/code.svg"); */ } #spell-no-suggestions { - --menuitem-image: url("./icons/text-proofing-tools.svg"); + --menuitem-image: url("../icons/text-proofing-tools.svg"); } #spell-add-to-dictionary { - --menuitem-image: url("./icons/book-add.svg"); + --menuitem-image: url("../icons/book-add.svg"); } #spell-undo-add-to-dictionary { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #context-openlinkincurrent { - --menuitem-image: url("./icons/link-square.svg"); + --menuitem-image: url("../icons/link-square.svg"); } #context-openlinkincontainertab { --menuitem-image: url("chrome://browser/skin/new-tab.svg"); @@ -32,7 +32,7 @@ --menuitem-image: url("chrome://browser/skin/new-tab.svg"); } #context-openlinkinusercontext-menu { - --menuitem-image: url("./icons/container-openin-16.svg"); + --menuitem-image: url("../icons/container-openin-16.svg"); } #context-openlink { --menuitem-image: url("chrome://browser/skin/window.svg"); @@ -48,16 +48,16 @@ --menuitem-image: url("chrome://browser/skin/save.svg"); } #context-savelinktopocket { - --menuitem-image: url("./icons/pocket-outline.svg"); + --menuitem-image: url("../icons/pocket-outline.svg"); } #context-copyemail { --menuitem-image: url("chrome://browser/skin/mail.svg"); } #context-copylink { - --menuitem-image: url("./icons/link.svg"); + --menuitem-image: url("../icons/link.svg"); } #context-sendlinktodevice { - --menuitem-image: url("./icons/send-to-device.svg"); + --menuitem-image: url("../icons/send-to-device.svg"); } #context-media-play { @@ -73,11 +73,11 @@ --menuitem-image: url("chrome://global/skin/media/audio.svg"); } #context-media-playbackrate { - --menuitem-image: url("./icons/time-picker.svg"); + --menuitem-image: url("../icons/time-picker.svg"); } #context-media-loop { /* checkbox */ - /* --menuitem-image: url("./icons/arrow-repeat-all.svg"); */ + /* --menuitem-image: url("../icons/arrow-repeat-all.svg"); */ } #context-leave-dom-fullscreen { --menuitem-image: url("chrome://global/skin/media/fullscreenExitButton.svg"); @@ -86,14 +86,14 @@ --menuitem-image: url("chrome://global/skin/media/fullscreenEnterButton.svg"); } #context-media-hidecontrols { - --menuitem-image: url("./icons/eye-hide.svg"); + --menuitem-image: url("../icons/eye-hide.svg"); } #context-media-showcontrols { - --menuitem-image: url("./icons/eye-show.svg"); + --menuitem-image: url("../icons/eye-show.svg"); } #context-viewvideo { - --menuitem-image: url("./icons/video.svg"); + --menuitem-image: url("../icons/video.svg"); } #context-video-pictureinpicture { /* checkbox */ @@ -101,30 +101,30 @@ } #context-reloadimage { - --menuitem-image: url("./icons/image-arrow-counterclockwise.svg"); + --menuitem-image: url("../icons/image-arrow-counterclockwise.svg"); } #context-viewimage { - --menuitem-image: url("./icons/image-add.svg"); + --menuitem-image: url("../icons/image-add.svg"); } #context-saveimage { - --menuitem-image: url("./icons/image.svg"); + --menuitem-image: url("../icons/image.svg"); } #context-video-saveimage { - --menuitem-image: url("./icons/video-snapshot.svg"); + --menuitem-image: url("../icons/video-snapshot.svg"); } #context-savevideo { - --menuitem-image: url("./icons/video.svg"); + --menuitem-image: url("../icons/video.svg"); } #context-saveaudio { --menuitem-image: url("chrome://global/skin/media/audio.svg"); } #context-copyimage-contents { - --menuitem-image: url("./icons/image-copy.svg"); + --menuitem-image: url("../icons/image-copy.svg"); } #context-copyimage, #context-copyvideourl, #context-copyaudiourl { - --menuitem-image: url("./icons/link.svg"); + --menuitem-image: url("../icons/link.svg"); } #context-sendimage, #context-sendvideo, @@ -135,10 +135,10 @@ --menuitem-image: url("chrome://global/skin/icons/info.svg"); } #context-viewimagedesc { - --menuitem-image: url("./icons/image-alt-text.svg"); + --menuitem-image: url("../icons/image-alt-text.svg"); } #context-setDesktopBackground { - --menuitem-image: url("./icons/resize-image.svg"); + --menuitem-image: url("../icons/resize-image.svg"); } #context-ctp-play { --menuitem-image: url("chrome://global/skin/icons/plugin.svg"); @@ -151,23 +151,23 @@ --menuitem-image: url("chrome://browser/skin/save.svg"); } #context-pocket { - --menuitem-image: url("./icons/pocket-outline.svg"); + --menuitem-image: url("../icons/pocket-outline.svg"); } #context-sendpagetodevice { - --menuitem-image: url("./icons/send-to-device.svg"); + --menuitem-image: url("../icons/send-to-device.svg"); } #fill-login { - --menuitem-image: url("./icons/password.svg"); + --menuitem-image: url("../icons/password.svg"); } #fill-login-generated-password { --menuitem-image: url("chrome://browser/skin/login.svg"); } #manage-saved-logins { - --menuitem-image: url("./icons/key-multiple.svg"); + --menuitem-image: url("../icons/key-multiple.svg"); } #context-undo { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #context-redo { } @@ -176,7 +176,7 @@ --menuitem-image: url("chrome://browser/skin/edit-cut.svg"); } #context-copy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #context-paste { --menuitem-image: url("chrome://browser/skin/edit-paste.svg"); @@ -185,7 +185,7 @@ --menuitem-image: url("chrome://global/skin/icons/delete.svg"); } #context-selectall { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } #context-print-selection { --menuitem-image: url("chrome://global/skin/icons/print.svg"); @@ -204,35 +204,35 @@ } #frame { - --menuitem-image: url("./icons/command-frames.svg"); + --menuitem-image: url("../icons/command-frames.svg"); } #spell-check-enabled { /* checkbox */ } #spell-add-dictionaries-main { - --menuitem-image: url("./icons/book-add.svg"); + --menuitem-image: url("../icons/book-add.svg"); } #spell-dictionaries { - --menuitem-image: url("./icons/book.svg"); + --menuitem-image: url("../icons/book.svg"); } #context-bidi-text-direction-toggle { - --menuitem-image: url("./icons/text-direction-horizontal-ltr.svg"); + --menuitem-image: url("../icons/text-direction-horizontal-ltr.svg"); } #context-bidi-page-direction-toggle { - --menuitem-image: url("./icons/document-landscape-split-hint.svg"); + --menuitem-image: url("../icons/document-landscape-split-hint.svg"); } #context-viewpartialsource-selection, #context-viewsource { - --menuitem-image: url("./icons/document-search.svg"); + --menuitem-image: url("../icons/document-search.svg"); } #context-inspect-a11y { --menuitem-image: url("chrome://devtools/skin/images/tool-accessibility.svg"); } #context-inspect { - --menuitem-image: url("./icons/command-pick.svg"); + --menuitem-image: url("../icons/command-pick.svg"); } #context-media-eme-learnmore { @@ -247,7 +247,7 @@ --menuitem-image: url("chrome://browser/skin/forward.svg"); } #context-reload { - --menuitem-image: url("./icons/reload.svg"); + --menuitem-image: url("../icons/reload.svg"); } #context-stop { --menuitem-image: url("chrome://global/skin/icons/close.svg"); diff --git a/src/icons/context_menu/_others.scss b/src/icons/context_menu/_others.scss index 55a2e32..36973e7 100644 --- a/src/icons/context_menu/_others.scss +++ b/src/icons/context_menu/_others.scss @@ -21,7 +21,7 @@ /*= pictureInPictureToggleContextMenu ========================================*/ #pictureInPictureToggleContextMenu > menuitem[oncommand="PictureInPicture.hideToggle();"] { - --menuitem-image: url("./icons/eye-hide.svg"); + --menuitem-image: url("../icons/eye-hide.svg"); } /*= pageActionContextMenu ====================================================*/ @@ -34,7 +34,7 @@ /*= customizationPanelItemContextMenu ========================================*/ #customizationPanelItemContextMenuUnpin { - --menuitem-image: url("./icons/unpin-tab.svg"); + --menuitem-image: url("../icons/unpin-tab.svg"); } .customize-context-removeFromPanel { --menuitem-image: url("chrome://global/skin/icons/delete.svg"); @@ -66,7 +66,7 @@ --menuitem-image: url("chrome://global/skin/media/play-fill.svg"); } .downloadUnblockMenuItem { - --menuitem-image: url("./icons/checkmark-circle.svg"); + --menuitem-image: url("../icons/checkmark-circle.svg"); } .downloadUseSystemDefaultMenuItem { --menuitem-image: url("chrome://browser/skin/open.svg"); @@ -77,31 +77,31 @@ .downloadShowMenuItem { --menuitem-image: url("chrome://global/skin/icons/folder.svg"); @include Option("userChrome.icon.library") { - --menuitem-image: url("./icons/folder.svg"); + --menuitem-image: url("../icons/folder.svg"); } } #downloadsContextMenu > menuitem[command="downloadsCmd_openReferrer"] { - --menuitem-image: url("./icons/link-square.svg"); + --menuitem-image: url("../icons/link-square.svg"); } #downloadsContextMenu > menuitem[command="downloadsCmd_copyLocation"] { - --menuitem-image: url("./icons/link.svg"); + --menuitem-image: url("../icons/link.svg"); } .downloadDeleteFileMenuItem { --menuitem-image: url("chrome://global/skin/icons/delete.svg"); } .downloadRemoveFromHistoryMenuItem { - --menuitem-image: url("./icons/eraser.svg"); + --menuitem-image: url("../icons/eraser.svg"); } #downloadsContextMenu > menuitem[command="downloadsCmd_clearList"], #downloadsContextMenu > menuitem[command="downloadsCmd_clearDownloads"] { - --menuitem-image: url("./icons/broom.svg"); + --menuitem-image: url("../icons/broom.svg"); } /*= SyncedTabsSidebarContext =================================================*/ #syncedTabsOpenSelected { - --menuitem-image: url("./icons/link-square.svg"); + --menuitem-image: url("../icons/link-square.svg"); } #syncedTabsOpenSelectedInTab { --menuitem-image: url("chrome://browser/skin/new-tab.svg"); @@ -117,11 +117,11 @@ --menuitem-image: url("chrome://browser/skin/bookmark.svg"); } #syncedTabsCopySelected { - --menuitem-image: url("./icons/link.svg"); + --menuitem-image: url("../icons/link.svg"); } #syncedTabsOpenAllInTabs { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } #syncedTabsManageDevices { --menuitem-image: url("chrome://global/skin/icons/settings.svg"); @@ -132,13 +132,13 @@ /*= SyncedTabsSidebarTabsFilterContext =======================================*/ #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_undo"] { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_cut"] { --menuitem-image: url("chrome://browser/skin/edit-cut.svg"); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_copy"] { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_paste"] { --menuitem-image: url("chrome://browser/skin/edit-paste.svg"); @@ -148,7 +148,7 @@ } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_selectAll"] { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } #syncedTabsRefreshFilter { @@ -157,7 +157,7 @@ /*= urlbar-input-container ===================================================*/ #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_undo"] { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_redo"] { } @@ -166,7 +166,7 @@ --menuitem-image: url("chrome://browser/skin/edit-cut.svg"); } #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_copy"] { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_paste"] { --menuitem-image: url("chrome://browser/skin/edit-paste.svg"); @@ -177,13 +177,13 @@ --menuitem-image: url("chrome://global/skin/icons/delete.svg"); } #urlbar-input-container .textbox-contextmenu menuitem[cmd="cmd_selectAll"] { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } /*= textbox-contextmenu ======================================================*/ /* Browser's Searchbar, Libray's Searchbar, Page Info */ .textbox-contextmenu > menuitem[data-l10n-id="text-action-undo"] { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } .textbox-contextmenu > menuitem[data-l10n-id="text-action-redo"] { } @@ -192,7 +192,7 @@ --menuitem-image: url("chrome://browser/skin/edit-cut.svg"); } .textbox-contextmenu > menuitem[data-l10n-id="text-action-copy"] { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } .textbox-contextmenu > menuitem[data-l10n-id="text-action-paste"] { --menuitem-image: url("chrome://browser/skin/edit-paste.svg"); @@ -201,7 +201,7 @@ --menuitem-image: url("chrome://global/skin/icons/delete.svg"); } .textbox-contextmenu > menuitem[data-l10n-id="text-action-select-all"] { - --menuitem-image: url("./icons/select-all-on.svg"); + --menuitem-image: url("../icons/select-all-on.svg"); } /* Only searchbar */ @@ -239,7 +239,7 @@ menupopup:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup) menupopup:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup) > .sync-menuitem.sendtab-target[clientType=""] { - --menuitem-image: url("./icons/send-to-device.svg"); + --menuitem-image: url("../icons/send-to-device.svg"); } menupopup:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup) diff --git a/src/icons/context_menu/_place.scss b/src/icons/context_menu/_place.scss index 2ff1f1d..6310fa2 100644 --- a/src/icons/context_menu/_place.scss +++ b/src/icons/context_menu/_place.scss @@ -1,10 +1,10 @@ /*= placeContext =============================================================*/ #placesContext_open { - --menuitem-image: url("./icons/link-square.svg"); + --menuitem-image: url("../icons/link-square.svg"); } #placesContext_openBookmarkContainer\:tabs, #placesContext_openBookmarkLinks\:tabs { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } #placesContext_open\:newtab, #placesContext_openContainer\:tabs, @@ -30,17 +30,17 @@ --menuitem-image: url("chrome://global/skin/icons/delete.svg"); } #placesContext_deleteHost { - --menuitem-image: url("./icons/eye-hide.svg"); + --menuitem-image: url("../icons/eye-hide.svg"); } #placesContext_sortBy\:name { - --menuitem-image: url("./icons/text-sort-ascending.svg"); + --menuitem-image: url("../icons/text-sort-ascending.svg"); } #placesContext_cut { --menuitem-image: url("chrome://browser/skin/edit-cut.svg"); } #placesContext_copy { - --menuitem-image: url("./icons/edit-copy.svg"); + --menuitem-image: url("../icons/edit-copy.svg"); } #placesContext_paste_group { --menuitem-image: url("chrome://browser/skin/edit-paste.svg"); @@ -52,11 +52,11 @@ #placesContext_new\:folder { --menuitem-image: url("chrome://global/skin/icons/folder.svg"); @include Option("userChrome.icon.library") { - --menuitem-image: url("./icons/folder.svg"); + --menuitem-image: url("../icons/folder.svg"); } } #placesContext_new\:separator { - --menuitem-image: url("./icons/vertical-line.svg"); + --menuitem-image: url("../icons/vertical-line.svg"); } #placesContext_paste { @@ -68,12 +68,12 @@ } #show-other-bookmarks_PersonalToolbar { /* checkbox */ - /* --menuitem-image: url("./icons/star-line-horizontal.svg"); */ + /* --menuitem-image: url("../icons/star-line-horizontal.svg"); */ } #placesContext_showAllBookmarks { --menuitem-image: url("chrome://browser/skin/bookmark-star-on-tray.svg"); } .openintabs-menuitem { - --menuitem-image: url("./icons/movetowindow-16.svg"); + --menuitem-image: url("../icons/movetowindow-16.svg"); } diff --git a/src/icons/context_menu/_tab_toolbar.scss b/src/icons/context_menu/_tab_toolbar.scss index 54ab5da..112584f 100644 --- a/src/icons/context_menu/_tab_toolbar.scss +++ b/src/icons/context_menu/_tab_toolbar.scss @@ -5,7 +5,7 @@ #context_reloadTab, #context_reloadSelectedTabs { - --menuitem-image: url("./icons/reload.svg"); + --menuitem-image: url("../icons/reload.svg"); } #context_toggleMuteTab, #context_toggleMuteSelectedTabs { @@ -17,15 +17,15 @@ } #context_pinTab, #context_pinSelectedTabs { - --menuitem-image: url("./icons/pin-tab.svg"); + --menuitem-image: url("../icons/pin-tab.svg"); } #context_unpinTab, #context_unpinSelectedTabs { - --menuitem-image: url("./icons/unpin-tab.svg"); + --menuitem-image: url("../icons/unpin-tab.svg"); } #context_duplicateTab, #context_duplicateTabs { - --menuitem-image: url("./icons/notebook-subsection.svg"); + --menuitem-image: url("../icons/notebook-subsection.svg"); } #context_bookmarkTab, @@ -33,22 +33,22 @@ --menuitem-image: url("chrome://browser/skin/bookmark.svg"); } #context_moveTabOptions { - --menuitem-image: url("./icons/arrow-swap.svg"); + --menuitem-image: url("../icons/arrow-swap.svg"); } #context_sendTabToDevice { - --menuitem-image: url("./icons/send-to-device.svg"); + --menuitem-image: url("../icons/send-to-device.svg"); } #context_sendTabToDevice:is([disabled="true"]) + #context_shareTabURL, /* Legacy */ #context_sendTabToDevice:is([disabled="true"]) + menuitem.share-tab-url-item { /* At windows */ - --menuitem-image: url("./icons/share.svg"); + --menuitem-image: url("../icons/share.svg"); } #context_reopenInContainer { - --menuitem-image: url("./icons/container-openin-16.svg"); + --menuitem-image: url("../icons/container-openin-16.svg"); } #context_selectAllTabs { - --menuitem-image: url("./icons/tab-multiple.svg"); + --menuitem-image: url("../icons/tab-multiple.svg"); } #context_closeTab { @@ -57,13 +57,13 @@ #context_closeTabOptions { } #context_undoCloseTab { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } /*= new-tab-button-popup =====================================================*/ #new-tab-button-popup > menuitem[command="Browser:NewUserContextTab"], .new-tab-popup > menuitem[command="Browser:NewUserContextTab"] { - --menuitem-image: url("./icons/container-openin-16.svg"); + --menuitem-image: url("../icons/container-openin-16.svg"); } #new-tab-button-popup > menuitem[command="Browser:OpenAboutContainers"], @@ -79,14 +79,14 @@ --menuitem-image: url("chrome://global/skin/icons/delete.svg"); } .customize-context-reportExtension { - --menuitem-image: url("./icons/send.svg"); + --menuitem-image: url("../icons/send.svg"); } .customize-context-moveToPanel { --menuitem-image: url("chrome://browser/skin/pin-12.svg"); } .toolbar-context-autohide-downloads-button { - --menuitem-image: url("./icons/password-hide.svg"); + --menuitem-image: url("../icons/password-hide.svg"); } .customize-context-removeFromToolbar { --menuitem-image: url("chrome://global/skin/icons/delete.svg"); @@ -97,22 +97,22 @@ #toolbar-context-reloadSelectedTab, #toolbar-context-reloadSelectedTabs { - --menuitem-image: url("./icons/reload.svg"); + --menuitem-image: url("../icons/reload.svg"); } #toolbar-context-bookmarkSelectedTab, #toolbar-context-bookmarkSelectedTabs { --menuitem-image: url("chrome://browser/skin/bookmark.svg"); } #toolbar-context-selectAllTabs { - --menuitem-image: url("./icons/tab-multiple.svg"); + --menuitem-image: url("../icons/tab-multiple.svg"); } #toolbar-context-undoCloseTab { - --menuitem-image: url("./icons/undo.svg"); + --menuitem-image: url("../icons/undo.svg"); } #toggle_toolbar-menubar { /* checkbox */ - /* --menuitem-image: url("./icons/calendar-agenda.svg"); */ + /* --menuitem-image: url("../icons/calendar-agenda.svg"); */ } #toggle_PersonalToolbar { /* Also placeContext */ diff --git a/src/library/_default_open.scss b/src/library/_default_open.scss index 5e383a0..5fb2e31 100644 --- a/src/library/_default_open.scss +++ b/src/library/_default_open.scss @@ -11,7 +11,7 @@ :-moz-any(#historyTree, #placesList, #placeContent) treechildren::-moz-tree-image(title, query, open, dayContainer), :-moz-any(#historyTree, #placesList, #placeContent) treechildren::-moz-tree-image(query, open, OrganizerQuery_history____v) { - list-style-image: url("./icons/history-reverse.svg") !important; + list-style-image: url("../icons/history-reverse.svg") !important; } /* Tag */ @@ -19,7 +19,7 @@ .bookmark-item[container="true"][tagContainer="true"][open="true"], :-moz-any(#placesList, #placeContent) treechildren::-moz-tree-image(title, query, open, tagContainer), :-moz-any(#placesList, #placeContent) treechildren::-moz-tree-image(query, open, OrganizerQuery_tags_______v) { - list-style-image: url("./icons/tag-open.svg") !important; + list-style-image: url("../icons/tag-open.svg") !important; } /* Boomark */ @@ -32,11 +32,11 @@ #bookmarksMenuPopup #bookmarksToolbarFolderMenu[open="true"], :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, open, queryFolder_toolbar_____) { - list-style-image: url("./icons/bookmarksToolbar-open.svg") !important; + list-style-image: url("../icons/bookmarksToolbar-open.svg") !important; } /* Bookmark Menu */ :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, open, queryFolder_menu________) { - list-style-image: url("./icons/bookmarksMenu-open.svg") !important; /* or bookmarksMenu-open2.svg" */ + list-style-image: url("../icons/bookmarksMenu-open.svg") !important; /* or bookmarksMenu-open2.svg" */ } diff --git a/src/library/_inbox.scss b/src/library/_inbox.scss index 0673889..7bd8040 100644 --- a/src/library/_inbox.scss +++ b/src/library/_inbox.scss @@ -8,7 +8,7 @@ :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, queryFolder_unfiled_____), #editBMPanel_unfiledRootItem, #editBMPanel_folderMenuList[selectedGuid="unfiled_____"] { - list-style-image: url("./icons/mail-inbox-all.svg") !important; + list-style-image: url("../icons/mail-inbox-all.svg") !important; } /* Other Folder - Open */ @@ -19,5 +19,5 @@ treechildren::-moz-tree-image(container, open, OrganizerQuery_UnfiledBookmarks), :-moz-any(#bookmarks-view, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(container, open, queryFolder_unfiled_____) { - list-style-image: url("./icons/mail-inbox.svg") !important; + list-style-image: url("../icons/mail-inbox.svg") !important; } diff --git a/src/library/_menubar.scss b/src/library/_menubar.scss index 37885fc..c9624a5 100644 --- a/src/library/_menubar.scss +++ b/src/library/_menubar.scss @@ -14,10 +14,10 @@ list-style-image: url("chrome://global/skin/icons/settings.svg") !important; } #viewMenu { - list-style-image: url("./icons/sort.svg") !important; + list-style-image: url("../icons/sort.svg") !important; } #maintenanceButton { - list-style-image: url("./icons/import-export.svg") !important; + list-style-image: url("../icons/import-export.svg") !important; } #clearDownloadsButton { diff --git a/src/library/_standard_folder.scss b/src/library/_standard_folder.scss index 6e9fa6b..87b88f0 100644 --- a/src/library/_standard_folder.scss +++ b/src/library/_standard_folder.scss @@ -9,7 +9,7 @@ #editBMPanel_folderMenuList .folder-icon:not([id]), /* Download Popup */ .downloadIconShow > .button-box > .button-icon { - list-style-image: url("./icons/folder.svg") !important; + list-style-image: url("../icons/folder.svg") !important; } /* Standard Folder - Open */ @@ -17,5 +17,5 @@ .bookmark-item[container="true"]:not([query="true"], [tagContainer], [dayContainer])[open="true"], :-moz-any(#bookmarks-view, #historyTree, #editBMPanel_folderTree, #placesList, #placeContent) treechildren::-moz-tree-image(title, container, open) { - list-style-image: url("./icons/folder-open.svg") !important; + list-style-image: url("../icons/folder-open.svg") !important; } diff --git a/src/menu/_icons_layout.scss b/src/menu/_icons_layout.scss index 0091527..ba14f04 100644 --- a/src/menu/_icons_layout.scss +++ b/src/menu/_icons_layout.scss @@ -39,7 +39,7 @@ menupopup:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup) :not(menu, #ContentSelectDropdown) > menupopup > menu:not(.menu-iconic, [type="checkbox"], [checked="true"], .in-menulist) { - list-style-image: var(--menuitem-image, url("./icons/blank.svg")) !important; + list-style-image: var(--menuitem-image, url("../icons/blank.svg")) !important; } } @@ -197,7 +197,7 @@ menupopup:is(#context_sendTabToDevicePopupMenu, #context-sendpagetodevice-popup) menuitem:not(.menuitem-iconic, .in-menulist, [type="checkbox"], [checked="true"], .bookmark-item), menupopup:is(#menu_FilePopup, #menu_EditPopup, #menu_viewPopup, #goPopup, #historyMenuPopup, #bookmarksMenuPopup, #menu_ToolsPopup, #menu_HelpPopup) menu:not(.menu-iconic, .in-menulist, [type="checkbox"], [checked="true"]) { - list-style-image: var(--menuitem-image, url("./icons/blank.svg")); + list-style-image: var(--menuitem-image, url("../icons/blank.svg")); } */ } diff --git a/src/tabbar/clipped_tab/_show_close_button_at_hover.scss b/src/tabbar/clipped_tab/_show_close_button_at_hover.scss index b634958..8751528 100644 --- a/src/tabbar/clipped_tab/_show_close_button_at_hover.scss +++ b/src/tabbar/clipped_tab/_show_close_button_at_hover.scss @@ -53,7 +53,7 @@ /* Closed Button's icon thicker */ .tabbrowser-tab .tab-content > .close-icon { - list-style-image: url("./icons/dismiss-filled.svg") !important; + list-style-image: url("../icons/dismiss-filled.svg") !important; } /* Closed Button's icon larger */ diff --git a/src/tabbar/newtab_button/_looks_like_tab.scss b/src/tabbar/newtab_button/_looks_like_tab.scss index 50a2e28..94a0f8e 100644 --- a/src/tabbar/newtab_button/_looks_like_tab.scss +++ b/src/tabbar/newtab_button/_looks_like_tab.scss @@ -13,7 +13,7 @@ /* Corner Rounding Image */ --newtab-position: calc((var(--tab-corner-rounding) / 2) * -1); - background-image: url("./icons/tab-bottom-corner-left.svg"), url("./icons/tab-bottom-corner-right.svg"); + background-image: url("../icons/tab-bottom-corner-left.svg"), url("../icons/tab-bottom-corner-right.svg"); background-repeat: no-repeat; background-position: left var(--newtab-position) bottom var(--tabs-navbar-original-shadow-size), right var(--newtab-position) bottom var(--tabs-navbar-original-shadow-size); diff --git a/src/tabbar/selected_tab/_bottom_rounded_corner.scss b/src/tabbar/selected_tab/_bottom_rounded_corner.scss index 1aa2ee4..0bfecc6 100644 --- a/src/tabbar/selected_tab/_bottom_rounded_corner.scss +++ b/src/tabbar/selected_tab/_bottom_rounded_corner.scss @@ -46,12 +46,12 @@ tab[visuallyselected] > stack::before { left: var(--tab-corner-position) !important; - background-image: url("./icons/tab-bottom-corner-left.svg"); + background-image: url("../icons/tab-bottom-corner-left.svg"); } tab[visuallyselected] > stack::after { left: auto; right: var(--tab-corner-position); - background-image: url("./icons/tab-bottom-corner-right.svg"); + background-image: url("../icons/tab-bottom-corner-right.svg"); } @include OS($linux) { diff --git a/waterfox.sh b/waterfox.sh index 071178e..b9f7929 100755 --- a/waterfox.sh +++ b/waterfox.sh @@ -5,7 +5,7 @@ # `./icons/` to `chrome://browser/skin/lepton/` replace_icon_path() { file=$1 - sed -i "s/\.\/icons\//chrome:\/\/browser\/skin\/lepton\//g" "${file}" + sed -i "s/\.\.\/icons\//chrome:\/\/browser\/skin\/lepton\//g" "${file}" } replace_icon_path css/leptonChrome.css replace_icon_path css/leptonContent.css From 78bf08f05cb49e3a1bde4909adf8225e9c566859 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 19 Apr 2022 15:22:29 +0900 Subject: [PATCH 14/39] Doc: Move lepton stylesheets --- docs/Project_Structure.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/Project_Structure.md b/docs/Project_Structure.md index 3763558..712fea2 100644 --- a/docs/Project_Structure.md +++ b/docs/Project_Structure.md @@ -18,10 +18,11 @@ The overall structure of this project. root |- __tests__/: Mixin spec test |- icons/: Icons, illustrations +|- css/: Build result of SCSS Files |- docs/: Development Documents |- src/: Source files -|- src/userChrome.scss: Entry of SCSS for Browser UI -|- src/userContent.scss: Entry of SCSS for Web pages +|- src/leptonChrome.scss: Entry of SCSS for Browser UI +|- src/leptonContent.scss: Entry of SCSS for Web pages |- .gitattributes: Exclude at `Download Zip` |- .github: Issue/PR Template, Github Actions |- .prettierignore: Exclude coding style @@ -31,8 +32,8 @@ root |- package.json: Build setup, package dependency |- LEPTON: Meta infos (branch, version) |- user.js: about:config settings -|- userChrome.css: Build result of src/userChrome.scss (Don't modify directly!!) -|- userContent.css: Build result of src/userContent.scss (Don't modify directly!!) +|- userChrome.css: Entry of css for Browser UI (Don't modify directly!!) +|- userContent.css: Entry of css for Web pages (Don't modify directly!!) |- yarn.lock: Auto generated dependency (Don't modify directly!!) ``` From 6fb2ddcb6467fcc5ccf3eafd6d89432edbf9d4a2 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 20 Apr 2022 08:58:13 +0900 Subject: [PATCH 15/39] Fix: Install - typo --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c7863da..207c115 100755 --- a/install.sh +++ b/install.sh @@ -797,7 +797,7 @@ update_profile() { git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" git --git-dir "${LEPTONGITPATH}" pull --no-edit - if [ "${customFileExist}" == "true" ]; then + if [ "${gitDirty}" == "true" ]; then git --git-dir "${LEPTONGITPATH}" stash pop fi From 1663cc08e7849cb98baf156724d73804e4990492 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 20 Apr 2022 11:34:39 +0900 Subject: [PATCH 16/39] Clean: Install - separated file stash and pop --- install.sh | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index 207c115..ebeb965 100755 --- a/install.sh +++ b/install.sh @@ -774,6 +774,21 @@ install_profile() { } #** Update ********************************************************************* +file_stash() { + # use as: local gitDirty="$(file_stash GIT_PATH)" + gitDir=$1 + if [[ $(git diff --stat) != '' ]]; then + git --git-dir "${gitDir}" stash + fi +} +file_restore() { + local gitDir=$1 + local gitDirty=$2 + if [ -n "${gitDirty}" ]; then + git --git-dir "${gitDir}" --quiet stash pop + fi +} + update_profile() { check_git for profileDir in "${firefoxProfileDirPaths[@]}"; do @@ -787,20 +802,12 @@ update_profile() { local LEPTONGITPATH="${Path}/chrome/.git" if [ "${Type}" == "Git" ]; then - local gitDirty="" - - if [[ $(git diff --stat) != '' ]]; then - gitDirty="true" - git --git-dir "${LEPTONGITPATH}" stash - fi + local gitDirty="$(file_stash ${LEPTONGITPATH})" git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" git --git-dir "${LEPTONGITPATH}" pull --no-edit - if [ "${gitDirty}" == "true" ]; then - git --git-dir "${LEPTONGITPATH}" stash pop - fi - + file_restore "${LEPTONGITPATH}" "${gitDirty}" elif [ "${Type}" == "Local" ] || [ "${Type}" == "Release" ]; then check_chrome_exist clone_lepton From ab7df7dbbfc01b898de173243679f2f5c747c01f Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 20 Apr 2022 16:16:41 +0900 Subject: [PATCH 17/39] Fix: Install - `apply_custom_file` auto detected duplication --- install.sh | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/install.sh b/install.sh index ebeb965..1e3d495 100755 --- a/install.sh +++ b/install.sh @@ -657,21 +657,31 @@ copy_custom_files() { } customFileApplied="" +apply_custom_file() { + local targetFile=$1 + local customFile=$2 + local otherCustom=$3 + + if [ -f "${customFile}" ]; then + customFileApplied="true" + + # Apply without duplication + if ! grep -Fq "$(echo $(cat ${customFile}))" <(echo "$(echo $(cat ${targetFile}))"); then + cat "${customFile}" >> "${targetFile}" + fi + elif [ -n "${otherCustom}" ]; then + apply_custom_file "${targetFile}" "${otherCustom}" + fi +} + apply_custom_files() { for profilePath in "${firefoxProfilePaths[@]}"; do for customFile in "${customFiles[@]}"; do local targetFile="${customFile//-overrides/}" if [ "${customFile}" == "user-overrides.js" ]; then - if [ -f "${profilePath}/user-overrides.js" ]; then - customFileApplied="true" - cat "${profilePath}/user-overrides.js" >> "${profilePath}/${targetFile}" - elif [ -f "${profilePath}/chrome/user-overrides.js" ]; then - customFileApplied="true" - cat "${profilePath}/chrome/user-overrides.js" >> "${profilePath}/${targetFile}" - fi - elif [ -f "${profilePath}/chrome/${customFile}" ]; then - customFileApplied="true" - cat "${profilePath}/chrome/${customFile}" >> "${profilePath}/chrome/${targetFile}" + apply_custom_file "${profilePath}/${targetFile}" "${profilePath}/user-overrides.js" "${profilePath}/chrome/user-overrides.js" + else + apply_custom_file "${profilePath}/chrome/${targetFile}" "${profilePath}/chrome/${customFile}" fi done done @@ -739,12 +749,14 @@ copy_lepton() { install_local() { copy_lepton "${currentDir}" "user.js" copy_custom_files + apply_custom_files } install_release() { copy_lepton "chrome" "user.js" copy_custom_files + apply_custom_files } @@ -755,10 +767,10 @@ install_network() { clone_lepton copy_lepton copy_custom_files - apply_custom_files clean_lepton check_chrome_restore + apply_custom_files } install_profile() { @@ -824,6 +836,9 @@ update_profile() { local Ver=$(git --git-dir "${LEPTONINFOFILE}" describe --tags --abbrev=0) git --git-dir "${LEPTONGITPATH}" checkout "tags/${Ver}" fi + + clean_lepton + check_chrome_restore else lepton_error_message "Unable to find update type, ${Type} at ${section}" fi @@ -832,9 +847,6 @@ update_profile() { done apply_custom_files - - clean_lepton - check_chrome_restore } #** Main *********************************************************************** From a5fe529b48e40e30155e9b5c518a474ce6c638f4 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 20 Apr 2022 17:32:31 +0900 Subject: [PATCH 18/39] Fix: Install - specified git dir --- install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 1e3d495..426100c 100755 --- a/install.sh +++ b/install.sh @@ -789,7 +789,7 @@ install_profile() { file_stash() { # use as: local gitDirty="$(file_stash GIT_PATH)" gitDir=$1 - if [[ $(git diff --stat) != '' ]]; then + if [[ $(git --git-dir "${gitDir}" diff --stat) != '' ]]; then git --git-dir "${gitDir}" stash fi } From e72032ce2271939677f8f50f02053777dc9b9a94 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 21 Apr 2022 09:03:56 +0900 Subject: [PATCH 19/39] Fix: Install - port to pwsh - https://github.com/black7375/Firefox-UI-Fix/commit/1663cc08e7849cb98baf156724d73804e4990492 - https://github.com/black7375/Firefox-UI-Fix/commit/ab7df7dbbfc01b898de173243679f2f5c747c01f --- install.ps1 | 88 +++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 62 insertions(+), 26 deletions(-) diff --git a/install.ps1 b/install.ps1 index 2a20504..a908f96 100644 --- a/install.ps1 +++ b/install.ps1 @@ -49,13 +49,13 @@ https://github.com/black7375/Firefox-UI-Fix#readme param( [Alias("u")] - [Switch]$updateMode, + [switch]$updateMode, [Alias("f")] [string]$profileDir, [Alias("p")] [string]$profileName, [Alias("h")] - [Switch]$help = $false + [switch]$help = $false ) #** Helper Utils *************************************************************** @@ -678,23 +678,38 @@ function Copy-CustomFiles() { } $customFileApplied = $false +function Apply-CustomFile() { + Param ( + [Parameter(Mandatory=$true, Position=0)] + [string] $targetFile, + [Parameter(Mandatory=$true, Position=1)] + [string] $customFile, + [Parameter(Position=2)] + [string] $otherCustom + ) + + if ( Test-Path -Path "${customFile}" -PathType leaf ) { + $global:customFileApplied = $true + + # Apply without duplication + if ( -not (Write-Output "$(Write-Output $(Get-Content -Path ${targetFile}))" | Select-String -Pattern "$(Write-Output $(Get-Content -Path ${customFile}))" -SimpleMatch -Quiet) ) { + Get-Content -Path "${customFile}" | Out-File -FilePath "${targetFile}" -Append + } + elseif ( Test-Path -Path "${profilePath}\chrome\${customFile}" -PathType leaf ) { + Apply-CustomFile "${targetFile}" "${otherCustom}" + } + } +} + function Apply-CustomFiles() { foreach ( $profilePath in $global:firefoxProfilePaths ) { foreach ( $customFile in $global:customFiles ) { $local:targetFile = $customFile.Replace("-overrides", "") if ( "${customFile}" -eq "user-overrides.js" ) { - if ( Test-Path -Path "${profilePath}\user-overrides.js" -PathType leaf ) { - $global:customFileApplied = $true - Get-Content -Path "${profilePath}\user-overrides.js" | Out-File -FilePath "${profilePath}\${targetFile}" -Append - } - elseif ( Test-Path -Path "${profilePath}\chrome\user-overrides.js" -PathType leaf ) { - $global:customFileApplied = $true - Get-Content -Path "${profilePath}\chrome\user-overrides.js" | Out-File -FilePath "${profilePath}\${targetFile}" -Append - } + Apply-CustomFile "${profilePath}\${targetFile}" "${profilePath}\user-overrides.js" "${profilePath}\chrome\user-overrides.js" } - elseif ( Test-Path -Path "${profilePath}\chrome\${customFile}" -PathType leaf ) { - $global:customFileApplied = $true - Get-Content -Path "${profilePath}\chrome\${customFile}" | Out-File -FilePath "${profilePath}\chrome\${targetFile}" -Append + else { + Apply-CustomFile "${profilePath}\chrome\${targetFile}" "${profilePath}\chrome\${customFile}" } } } @@ -763,12 +778,14 @@ function Copy-Lepton() { function Install-Local() { Copy-Lepton "${currentDir}" "user.js" Copy-CustomFiles + Apply-CustomFiles } function Install-Release() { Copy-Lepton "chrome" "user.js" Copy-CustomFiles + Apply-CustomFiles } @@ -779,10 +796,11 @@ function Install-Network() { Clone-Lepton Copy-Lepton Copy-CustomFiles - Apply-CustomFiles Clean-Lepton Check-ChromeRestore + + Apply-CustomFiles } function Install-Profile() { @@ -798,6 +816,31 @@ function Install-Profile() { } #** Update ********************************************************************* +function Stash-File() { + Param ( + [Parameter(Position=0)] + [string] $gitDir = ".git" + ) + + if ( "$(git --git-dir "${gitDir}" diff --stat)" -ne '' ) { + git --git-dir "${gitDir}" checkout stash + return $true + } + return $false +} +function Restore-File() { + Param ( + [Parameter(Position=0)] + [string] $gitDir = ".git", + [Parameter(Position=1)] + [switch] $gitDirty = $false + ) + + if ( "${gitDirty}" -eq $true ) { + git --git-dir "${gitDir}" checkout stash pop + } +} + function Update-Profile() { Check-Git foreach ( $profileDir in $global:firefoxProfileDirPaths ) { @@ -812,19 +855,12 @@ function Update-Profile() { $local:LEPTONGITPATH="${Path}\chrome\.git" if ( "${Type}" -eq "Git" ) { - $local:gitDirty = $false - - if ( "$(git diff --stat)" -ne '' ) { - $local:gitDirty = $true - git --git-dir "${LEPTONGITPATH}" checkout stash - } + $local:gitDirty = $(Stash-File "${LEPTONGITPATH}") git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" git --git-dir "${LEPTONGITPATH}" pull --no-edit - if ( "${gitDirty}" -eq $true ) { - git --git-dir "${LEPTONGITPATH}" checkout stash pop - } + Restore-File "${LEPTONGITPATH}" $gitDirty } elseif ( "${Type}" -eq "Local" -or "${Type}" -eq "Release" ) { Check-ChromeExist @@ -842,6 +878,9 @@ function Update-Profile() { $local:Ver=$(git --git-dir "${LEPTONINFOFILE}" describe --tags --abbrev=0) git --git-dir "${LEPTONGITPATH}" checkout "tags/${Ver}" } + + Clean-Lepton + Check-ChromeRestore } else { Lepton-ErrorMessage "Unable to find update type, ${Type} at ${section}" @@ -851,9 +890,6 @@ function Update-Profile() { } Apply-CustomFiles - - Clean-Lepton - Check-ChromeRestore } #** Main *********************************************************************** From 31a88a7020c8d870d7dc0e175c80b3597e095124 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 21 Apr 2022 09:08:03 +0900 Subject: [PATCH 20/39] Doc: Restrictions - XUL attributes link --- docs/Restrictions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Restrictions.md b/docs/Restrictions.md index 6da0db3..c0a6728 100644 --- a/docs/Restrictions.md +++ b/docs/Restrictions.md @@ -121,4 +121,4 @@ Example of legacy documents that will help. - [UDN: ::-moz-tree-cell-text](https://udn.realityripple.com/docs/Mozilla/Gecko/Chrome/CSS/::-moz-tree-cell-text) Another case. -Like [``](https://udn.realityripple.com/docs/Archive/Mozilla/XUL/Attribute/align), [`attributes`] is set and CSS of same property may not be appplied. (Ex. [`box-align: start`](https://udn.realityripple.com/docs/Web/CSS/box-align)) +Like [``](https://udn.realityripple.com/docs/Archive/Mozilla/XUL/Attribute/align), [`attributes`](https://udn.realityripple.com/docs/Archive/Mozilla/XUL/Attribute) is set and CSS of same property may not be appplied. (Ex. [`box-align: start`](https://udn.realityripple.com/docs/Web/CSS/box-align)) From 7846695685a9a36b48719282cbdeeedc83b1c4c8 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 21 Apr 2022 10:38:31 +0900 Subject: [PATCH 21/39] Add: Restrictions - Namespace --- docs/Restrictions.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/docs/Restrictions.md b/docs/Restrictions.md index c0a6728..cd4eb0c 100644 --- a/docs/Restrictions.md +++ b/docs/Restrictions.md @@ -11,6 +11,7 @@ * [DOM structure cannot be modified](#dom-structure-cannot-be-modified) * [Shadow DOM](#shadow-dom) * [XUL](#xul) + * [Namespace](#namespace) @@ -122,3 +123,42 @@ Example of legacy documents that will help. Another case. Like [``](https://udn.realityripple.com/docs/Archive/Mozilla/XUL/Attribute/align), [`attributes`](https://udn.realityripple.com/docs/Archive/Mozilla/XUL/Attribute) is set and CSS of same property may not be appplied. (Ex. [`box-align: start`](https://udn.realityripple.com/docs/Web/CSS/box-align)) + +### Namespace +In older codes, the following [namespace](https://developer.mozilla.org/en-US/docs/Web/CSS/@namespace) is commonly seen: + +```css +@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); +``` + +However, it is [only applicable to XUL](https://www.userchrome.org/adding-style-recipes-userchrome-css.html#namespaces), so it is recommended to use with `prefix`. +```css +@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +/* Use */ +xul|search-textbox { + border: 2px solid red !important; +} +html|input { + border: 2px solid green !important; +} +``` + +If you want to limit the coverage to some pages, you can use [`@-moz-document`](https://developer.mozilla.org/en-US/docs/Web/CSS/@document): +```css +/* Main browser UI */ +@-moz-document url(chrome://browser/content/browser.xhtml) { + /* Your CSS */ +} + +/* Library UI */ +@-moz-document url("chrome://browser/content/places/places.xhtml") { + /* Your CSS */ +} + +/* PageInfo UI */ +@-moz-document url("chrome://browser/content/pageinfo/pageInfo.xhtml") { + /* Your CSS */ +} +``` From 8ab9ffff6923f090176d0307156c97eeb7efe0ea Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 21 Apr 2022 11:56:16 +0900 Subject: [PATCH 22/39] Fix: Install - Non local custom files --- install.ps1 | 9 +++++---- install.sh | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/install.ps1 b/install.ps1 index a908f96..6a4cafd 100644 --- a/install.ps1 +++ b/install.ps1 @@ -642,16 +642,17 @@ $customFiles = @( "userChrome-overrides.css", "userContent-overrides.css" ) +$localCustomFiles = $customFiles.Clone() $customFileExist = $false function Check-CustomFiles() { - $global:customFiles = Filter-Path $customFiles + $global:localCustomFiles = Filter-Path $localCustomFiles - if ( $global:customFiles.Length -gt 0 ) { + if ( $global:localCustomFiles.Length -gt 0 ) { $global:customFileExist = $true Lepton-OKMessage "Check custom file detected" - foreach ( $customFile in $global:customFiles ) { + foreach ( $customFile in $global:localCustomFiles ) { Write-Host "- ${customFile}" } } @@ -662,7 +663,7 @@ function Copy-CustomFiles() { # If Release or Network mode, Local is passed (Already copied) if ( "${leptonInstallType}" -ne "Local" ) { foreach ( $profilePath in $global:firefoxProfilePaths ) { - foreach ( $customFile in $global:customFiles ) { + foreach ( $customFile in $global:localCustomFiles ) { if ( "${customFile}" -eq "user-overrides.js" ) { Copy-Auto "${customFile}" "${profilePath}\${customFile}" } diff --git a/install.sh b/install.sh index 426100c..bf01f50 100755 --- a/install.sh +++ b/install.sh @@ -622,16 +622,17 @@ customFiles=( userChrome-overrides.css userContent-overrides.css ) +localCustomFiles=("${customFiles[@]}") customFileExist="" check_custom_files() { - paths_filter customFiles + paths_filter localCustomFiles - if [ "${#customFiles[@]}" -gt 0 ]; then + if [ "${#localCustomFiles[@]}" -gt 0 ]; then customFileExist="true" lepton_ok_message "Check custom file detected" - for customFile in "${customFiles[@]}"; do + for customFile in "${localCustomFiles[@]}"; do echo "- ${customFile}" done fi @@ -642,7 +643,7 @@ copy_custom_files() { # If Release or Network mode, Local is passed (Already copied) if [ "${leptonInstallType}" != "Local" ]; then for profilePath in "${firefoxProfilePaths[@]}"; do - for customFile in "${customFiles[@]}"; do + for customFile in "${localCustomFiles[@]}"; do if [ "${customFile}" == "user-overrides.js" ]; then autocp "${customFile}" "${profilePath}/${customFile}" else From b37e8e344626865b8990910e3e9809da504a78fc Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 21 Apr 2022 15:59:27 +0900 Subject: [PATCH 23/39] Fix: Install - Spacing at path --- install.ps1 | 4 ++-- install.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install.ps1 b/install.ps1 index 6a4cafd..3e19654 100644 --- a/install.ps1 +++ b/install.ps1 @@ -691,9 +691,9 @@ function Apply-CustomFile() { if ( Test-Path -Path "${customFile}" -PathType leaf ) { $global:customFileApplied = $true - + # Apply without duplication - if ( -not (Write-Output "$(Write-Output $(Get-Content -Path ${targetFile}))" | Select-String -Pattern "$(Write-Output $(Get-Content -Path ${customFile}))" -SimpleMatch -Quiet) ) { + if ( -not (Write-Output "$(Write-Output $(Get-Content -Path "${targetFile}"))" | Select-String -Pattern "$(Write-Output $(Get-Content -Path "${customFile}"))" -SimpleMatch -Quiet) ) { Get-Content -Path "${customFile}" | Out-File -FilePath "${targetFile}" -Append } elseif ( Test-Path -Path "${profilePath}\chrome\${customFile}" -PathType leaf ) { diff --git a/install.sh b/install.sh index bf01f50..1374422 100755 --- a/install.sh +++ b/install.sh @@ -667,7 +667,7 @@ apply_custom_file() { customFileApplied="true" # Apply without duplication - if ! grep -Fq "$(echo $(cat ${customFile}))" <(echo "$(echo $(cat ${targetFile}))"); then + if ! grep -Fq "$(echo $(cat "${customFile}"))" <(echo "$(echo $(cat "${targetFile}"))"); then cat "${customFile}" >> "${targetFile}" fi elif [ -n "${otherCustom}" ]; then From f9d476b906eb7084e94378ec8ac7aea970be1563 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 22 Apr 2022 11:31:53 +0900 Subject: [PATCH 24/39] Fix: Install - Powershell's otherCustom option --- install.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.ps1 b/install.ps1 index 3e19654..3636e67 100644 --- a/install.ps1 +++ b/install.ps1 @@ -686,7 +686,7 @@ function Apply-CustomFile() { [Parameter(Mandatory=$true, Position=1)] [string] $customFile, [Parameter(Position=2)] - [string] $otherCustom + [string] $otherCustom = "" ) if ( Test-Path -Path "${customFile}" -PathType leaf ) { @@ -696,9 +696,9 @@ function Apply-CustomFile() { if ( -not (Write-Output "$(Write-Output $(Get-Content -Path "${targetFile}"))" | Select-String -Pattern "$(Write-Output $(Get-Content -Path "${customFile}"))" -SimpleMatch -Quiet) ) { Get-Content -Path "${customFile}" | Out-File -FilePath "${targetFile}" -Append } - elseif ( Test-Path -Path "${profilePath}\chrome\${customFile}" -PathType leaf ) { - Apply-CustomFile "${targetFile}" "${otherCustom}" - } + } + elseif ( "${otherCustom}" -ne "" ) { + Apply-CustomFile "${targetFile}" "${otherCustom}" } } From 9d6be93ad672cda8ea7eb69530b170f5da05c01f Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 22 Apr 2022 14:02:23 +0900 Subject: [PATCH 25/39] Add: Install - Custom method selection --- install.ps1 | 72 +++++++++++++++++++++++++++++++++++++++++++++++------ install.sh | 64 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 119 insertions(+), 17 deletions(-) diff --git a/install.ps1 b/install.ps1 index 3636e67..7ab7a6b 100644 --- a/install.ps1 +++ b/install.ps1 @@ -679,38 +679,94 @@ function Copy-CustomFiles() { } $customFileApplied = $false +$customMethod = "" +$customReset = $false +$customAppend = $false function Apply-CustomFile() { Param ( [Parameter(Mandatory=$true, Position=0)] - [string] $targetFile, + [string] $gitDir, [Parameter(Mandatory=$true, Position=1)] + [string] $targetFile, + [Parameter(Mandatory=$true, Position=2)] [string] $customFile, - [Parameter(Position=2)] + [Parameter(Position=3)] [string] $otherCustom = "" ) if ( Test-Path -Path "${customFile}" -PathType leaf ) { $global:customFileApplied = $true - # Apply without duplication - if ( -not (Write-Output "$(Write-Output $(Get-Content -Path "${targetFile}"))" | Select-String -Pattern "$(Write-Output $(Get-Content -Path "${customFile}"))" -SimpleMatch -Quiet) ) { - Get-Content -Path "${customFile}" | Out-File -FilePath "${targetFile}" -Append + if ( "${customMethod}" -eq "" ) { + $local:menuAppend="Append - Maintain changes in existing files and apply custom" + $local:menuOverwrite="Overwrite - After initializing the change, apply only custom" + $local:menuNone="None - Maintain changes in existing files" + $local:menuReset="Reset- Reset to pure lepton theme without custom" + + Write-Host "Select custom method" + while ( $true ) { + $local:selected = $false + $local:applyMethod = Menu @("${menuAppend}", "${menuOverwrite}", "${menuNone}", "${menuReset}") + switch ( $applyMethod ) { + "${menuAppend}" { + $global:customMethod = "Append" + $global:customAppend = $true + $selected = $true + } + "${menuOverwrite}" { + $global:customMethod = "Overwrite" + $global:customReset = $true + $global:customAppend = $true + $selected = $true + } + "${menuNone}" { + $global:customMethod = "None" + $selected = $true + } + "${menuReset}" { + $global:customMethod = "Reset" + $global:customReset = $true + $selected = $true + } + default { Write-Host "Invalid option, reselect please." } + } + + if ( $selected -eq $true ) { + break + } + } + + Lepton-OKMessage "Selected ${customMethod}" + } + + if ( "${customReset}" -eq $true ) { + git --git-dir "${gitDir}" reset --hard HEAD + } + if ( "${customAppend}" -eq $true ) { + # Apply without duplication + if ( -not (Write-Output "$(Write-Output $(Get-Content -Path "${targetFile}"))" | Select-String -Pattern "$(Write-Output $(Get-Content -Path "${customFile}"))" -SimpleMatch -Quiet) ) { + Get-Content -Path "${customFile}" | Out-File -FilePath "${targetFile}" -Append + } } } elseif ( "${otherCustom}" -ne "" ) { - Apply-CustomFile "${targetFile}" "${otherCustom}" + Apply-CustomFile "${gitDir}" "${targetFile}" "${otherCustom}" } } function Apply-CustomFiles() { foreach ( $profilePath in $global:firefoxProfilePaths ) { + $local:LEPTONGITPATH="${profilePath}\chrome\.git" foreach ( $customFile in $global:customFiles ) { $local:targetFile = $customFile.Replace("-overrides", "") if ( "${customFile}" -eq "user-overrides.js" ) { - Apply-CustomFile "${profilePath}\${targetFile}" "${profilePath}\user-overrides.js" "${profilePath}\chrome\user-overrides.js" + $local:targetPath = "${profilePath}\${targetFile}" + $local:customPath = "${profilePath}\user-overrides.js" + $local:otherCustomPath = "${profilePath}\chrome\user-overrides.js" + Apply-CustomFile "${LEPTONGITPATH}" "${targetPath}" "${customPath}" "${otherCustomPath}" } else { - Apply-CustomFile "${profilePath}\chrome\${targetFile}" "${profilePath}\chrome\${customFile}" + Apply-CustomFile "${LEPTONGITPATH}" "${profilePath}\chrome\${targetFile}" "${profilePath}\chrome\${customFile}" } } } diff --git a/install.sh b/install.sh index 1374422..ac22ab5 100755 --- a/install.sh +++ b/install.sh @@ -658,31 +658,77 @@ copy_custom_files() { } customFileApplied="" +customMethod="" +customReset="" +customAppend="" apply_custom_file() { - local targetFile=$1 - local customFile=$2 - local otherCustom=$3 + local gitDir=$1 + local targetFile=$2 + local customFile=$3 + local otherCustom=$4 if [ -f "${customFile}" ]; then customFileApplied="true" - # Apply without duplication - if ! grep -Fq "$(echo $(cat "${customFile}"))" <(echo "$(echo $(cat "${targetFile}"))"); then - cat "${customFile}" >> "${targetFile}" + if [ -z "${customMethod}" ]; then + local menuAppend="Append - Maintain changes in existing files and apply custom" + local menuOverwrite="Overwrite - After initializing the change, apply only custom" + local menuNone="None - Maintain changes in existing files" + local menuReset="Reset- Reset to pure lepton theme without custom" + + echo "Select custom method" + select applyMethod in "${menuAppend}" "${menuOverwrite}" "${menuNone}" "${menuReset}"; do + case "${applyMethod}" in + "${menuAppend}") + customMethod="Append" + customAppend="true" + break;; + "${menuOverwrite}") + customMethod="Overwrite" + customReset="true" + customAppend="true" + break;; + "${menuNone}") + customMethod="None" + break;; + "${menuReset}") + customMethod="Reset" + customReset="true" + break;; + *) + echo "Invalid option, reselect please.";; + esac + done + + lepton_ok_message "Selected ${customMethod}" + fi + + if [ "${customReset}" == "true" ]; then + git --git-dir "${gitDir}" reset --hard HEAD + fi + if [ "${customAppend}" == "true" ]; then + # Apply without duplication + if ! grep -Fq "$(echo $(cat "${customFile}"))" <(echo "$(echo $(cat "${targetFile}"))"); then + cat "${customFile}" >> "${targetFile}" + fi fi elif [ -n "${otherCustom}" ]; then - apply_custom_file "${targetFile}" "${otherCustom}" + apply_custom_file "${gitDir}" "${targetFile}" "${otherCustom}" fi } apply_custom_files() { for profilePath in "${firefoxProfilePaths[@]}"; do + local LEPTONGITPATH="${profilePath}/chrome/.git" for customFile in "${customFiles[@]}"; do local targetFile="${customFile//-overrides/}" if [ "${customFile}" == "user-overrides.js" ]; then - apply_custom_file "${profilePath}/${targetFile}" "${profilePath}/user-overrides.js" "${profilePath}/chrome/user-overrides.js" + local targetPath="${profilePath}/${targetFile}" + local customPath="${profilePath}/user-overrides.js" + local otherCustomPath="${profilePath}/chrome/user-overrides.js" + apply_custom_file "${LEPTONGITPATH}" "${targetPath}" "${customPath}" "${otherCustomPath}" else - apply_custom_file "${profilePath}/chrome/${targetFile}" "${profilePath}/chrome/${customFile}" + apply_custom_file "${LEPTONGITPATH}" "${profilePath}/chrome/${targetFile}" "${profilePath}/chrome/${customFile}" fi done done From ac51fa27531b6578c4da244155e956d7c12783d0 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 22 Apr 2022 14:15:07 +0900 Subject: [PATCH 26/39] Clean: Install - Powershell selection --- install.ps1 | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/install.ps1 b/install.ps1 index 7ab7a6b..a57e2b2 100644 --- a/install.ps1 +++ b/install.ps1 @@ -704,36 +704,27 @@ function Apply-CustomFile() { $local:menuReset="Reset- Reset to pure lepton theme without custom" Write-Host "Select custom method" - while ( $true ) { - $local:selected = $false + while ( "${customMethod}" -eq "" ) { $local:applyMethod = Menu @("${menuAppend}", "${menuOverwrite}", "${menuNone}", "${menuReset}") switch ( $applyMethod ) { "${menuAppend}" { $global:customMethod = "Append" $global:customAppend = $true - $selected = $true } "${menuOverwrite}" { $global:customMethod = "Overwrite" $global:customReset = $true $global:customAppend = $true - $selected = $true } "${menuNone}" { $global:customMethod = "None" - $selected = $true } "${menuReset}" { $global:customMethod = "Reset" $global:customReset = $true - $selected = $true } default { Write-Host "Invalid option, reselect please." } } - - if ( $selected -eq $true ) { - break - } } Lepton-OKMessage "Selected ${customMethod}" From 352616c87d47a4a929b19dbd7e58378a67707902 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 22 Apr 2022 15:01:29 +0900 Subject: [PATCH 27/39] Clean: Install - Separated set custom method --- install.ps1 | 66 ++++++++++++++++++++++++++++------------------------- install.sh | 66 ++++++++++++++++++++++++++++------------------------- 2 files changed, 70 insertions(+), 62 deletions(-) diff --git a/install.ps1 b/install.ps1 index a57e2b2..2fad4f3 100644 --- a/install.ps1 +++ b/install.ps1 @@ -678,10 +678,43 @@ function Copy-CustomFiles() { } } -$customFileApplied = $false $customMethod = "" $customReset = $false $customAppend = $false +function Set-CustomMethod() { + $local:menuAppend="Append - Maintain changes in existing files and apply custom" + $local:menuOverwrite="Overwrite - After initializing the change, apply only custom" + $local:menuNone="None - Maintain changes in existing files" + $local:menuReset="Reset- Reset to pure lepton theme without custom" + + Write-Host "Select custom method" + while ( "${customMethod}" -eq "" ) { + $local:applyMethod = Menu @("${menuAppend}", "${menuOverwrite}", "${menuNone}", "${menuReset}") + switch ( $applyMethod ) { + "${menuAppend}" { + $global:customMethod = "Append" + $global:customAppend = $true + } + "${menuOverwrite}" { + $global:customMethod = "Overwrite" + $global:customReset = $true + $global:customAppend = $true + } + "${menuNone}" { + $global:customMethod = "None" + } + "${menuReset}" { + $global:customMethod = "Reset" + $global:customReset = $true + } + default { Write-Host "Invalid option, reselect please." } + } + } + + Lepton-OKMessage "Selected ${customMethod}" +} + +$customFileApplied = $false function Apply-CustomFile() { Param ( [Parameter(Mandatory=$true, Position=0)] @@ -698,36 +731,7 @@ function Apply-CustomFile() { $global:customFileApplied = $true if ( "${customMethod}" -eq "" ) { - $local:menuAppend="Append - Maintain changes in existing files and apply custom" - $local:menuOverwrite="Overwrite - After initializing the change, apply only custom" - $local:menuNone="None - Maintain changes in existing files" - $local:menuReset="Reset- Reset to pure lepton theme without custom" - - Write-Host "Select custom method" - while ( "${customMethod}" -eq "" ) { - $local:applyMethod = Menu @("${menuAppend}", "${menuOverwrite}", "${menuNone}", "${menuReset}") - switch ( $applyMethod ) { - "${menuAppend}" { - $global:customMethod = "Append" - $global:customAppend = $true - } - "${menuOverwrite}" { - $global:customMethod = "Overwrite" - $global:customReset = $true - $global:customAppend = $true - } - "${menuNone}" { - $global:customMethod = "None" - } - "${menuReset}" { - $global:customMethod = "Reset" - $global:customReset = $true - } - default { Write-Host "Invalid option, reselect please." } - } - } - - Lepton-OKMessage "Selected ${customMethod}" + Set-CustomMethod } if ( "${customReset}" -eq $true ) { diff --git a/install.sh b/install.sh index ac22ab5..7416b27 100755 --- a/install.sh +++ b/install.sh @@ -657,10 +657,43 @@ copy_custom_files() { fi } -customFileApplied="" customMethod="" customReset="" customAppend="" +set_custom_method() { + local menuAppend="Append - Maintain changes in existing files and apply custom" + local menuOverwrite="Overwrite - After initializing the change, apply only custom" + local menuNone="None - Maintain changes in existing files" + local menuReset="Reset- Reset to pure lepton theme without custom" + + echo "Select custom method" + select applyMethod in "${menuAppend}" "${menuOverwrite}" "${menuNone}" "${menuReset}"; do + case "${applyMethod}" in + "${menuAppend}") + customMethod="Append" + customAppend="true" + break;; + "${menuOverwrite}") + customMethod="Overwrite" + customReset="true" + customAppend="true" + break;; + "${menuNone}") + customMethod="None" + break;; + "${menuReset}") + customMethod="Reset" + customReset="true" + break;; + *) + echo "Invalid option, reselect please.";; + esac + done + + lepton_ok_message "Selected ${customMethod}" +} + +customFileApplied="" apply_custom_file() { local gitDir=$1 local targetFile=$2 @@ -671,36 +704,7 @@ apply_custom_file() { customFileApplied="true" if [ -z "${customMethod}" ]; then - local menuAppend="Append - Maintain changes in existing files and apply custom" - local menuOverwrite="Overwrite - After initializing the change, apply only custom" - local menuNone="None - Maintain changes in existing files" - local menuReset="Reset- Reset to pure lepton theme without custom" - - echo "Select custom method" - select applyMethod in "${menuAppend}" "${menuOverwrite}" "${menuNone}" "${menuReset}"; do - case "${applyMethod}" in - "${menuAppend}") - customMethod="Append" - customAppend="true" - break;; - "${menuOverwrite}") - customMethod="Overwrite" - customReset="true" - customAppend="true" - break;; - "${menuNone}") - customMethod="None" - break;; - "${menuReset}") - customMethod="Reset" - customReset="true" - break;; - *) - echo "Invalid option, reselect please.";; - esac - done - - lepton_ok_message "Selected ${customMethod}" + set_custom_method fi if [ "${customReset}" == "true" ]; then From 9e9036a3801d0670693bdf21f05f84f2b0f649a3 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 22 Apr 2022 16:05:12 +0900 Subject: [PATCH 28/39] Fix: Install - Reset method --- install.ps1 | 17 +++++++++++------ install.sh | 16 ++++++++++------ 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/install.ps1 b/install.ps1 index 2fad4f3..23330cc 100644 --- a/install.ps1 +++ b/install.ps1 @@ -718,7 +718,7 @@ $customFileApplied = $false function Apply-CustomFile() { Param ( [Parameter(Mandatory=$true, Position=0)] - [string] $gitDir, + [string] $profilePath, [Parameter(Mandatory=$true, Position=1)] [string] $targetFile, [Parameter(Mandatory=$true, Position=2)] @@ -727,6 +727,7 @@ function Apply-CustomFile() { [string] $otherCustom = "" ) + $local:gitDir = "${profilePath}\chrome\.git" if ( Test-Path -Path "${customFile}" -PathType leaf ) { $global:customFileApplied = $true @@ -735,7 +736,12 @@ function Apply-CustomFile() { } if ( "${customReset}" -eq $true ) { - git --git-dir "${gitDir}" reset --hard HEAD + if ( "${targetFile}" -like "*user.js" ) { + Copy-Item -Path "${customFile}" -Destination "${targetFile}" -Force + } + else { + git --git-dir "${gitDir}" --quiet checkout HEAD -- "${targetFile}" + } } if ( "${customAppend}" -eq $true ) { # Apply without duplication @@ -745,23 +751,22 @@ function Apply-CustomFile() { } } elseif ( "${otherCustom}" -ne "" ) { - Apply-CustomFile "${gitDir}" "${targetFile}" "${otherCustom}" + Apply-CustomFile "${profilePath}" "${targetFile}" "${otherCustom}" } } function Apply-CustomFiles() { foreach ( $profilePath in $global:firefoxProfilePaths ) { - $local:LEPTONGITPATH="${profilePath}\chrome\.git" foreach ( $customFile in $global:customFiles ) { $local:targetFile = $customFile.Replace("-overrides", "") if ( "${customFile}" -eq "user-overrides.js" ) { $local:targetPath = "${profilePath}\${targetFile}" $local:customPath = "${profilePath}\user-overrides.js" $local:otherCustomPath = "${profilePath}\chrome\user-overrides.js" - Apply-CustomFile "${LEPTONGITPATH}" "${targetPath}" "${customPath}" "${otherCustomPath}" + Apply-CustomFile "${profilePath}" "${targetPath}" "${customPath}" "${otherCustomPath}" } else { - Apply-CustomFile "${LEPTONGITPATH}" "${profilePath}\chrome\${targetFile}" "${profilePath}\chrome\${customFile}" + Apply-CustomFile "${profilePath}" "${profilePath}\chrome\${targetFile}" "${profilePath}\chrome\${customFile}" } } } diff --git a/install.sh b/install.sh index 7416b27..ad8c568 100755 --- a/install.sh +++ b/install.sh @@ -695,11 +695,12 @@ set_custom_method() { customFileApplied="" apply_custom_file() { - local gitDir=$1 + local profilePath=$1 local targetFile=$2 local customFile=$3 local otherCustom=$4 + local gitDir="${profilePath}/chrome/.git" if [ -f "${customFile}" ]; then customFileApplied="true" @@ -708,7 +709,11 @@ apply_custom_file() { fi if [ "${customReset}" == "true" ]; then - git --git-dir "${gitDir}" reset --hard HEAD + if [[ "${targetFile}" == *"user.js" ]]; then + \cp -f "${profilePath}/chrome/user.js" "${targetFile}" + else + git --git-dir "${gitDir}" --quiet checkout HEAD -- "${targetFile}" + fi fi if [ "${customAppend}" == "true" ]; then # Apply without duplication @@ -717,22 +722,21 @@ apply_custom_file() { fi fi elif [ -n "${otherCustom}" ]; then - apply_custom_file "${gitDir}" "${targetFile}" "${otherCustom}" + apply_custom_file "${profilePath}" "${targetFile}" "${otherCustom}" fi } apply_custom_files() { for profilePath in "${firefoxProfilePaths[@]}"; do - local LEPTONGITPATH="${profilePath}/chrome/.git" for customFile in "${customFiles[@]}"; do local targetFile="${customFile//-overrides/}" if [ "${customFile}" == "user-overrides.js" ]; then local targetPath="${profilePath}/${targetFile}" local customPath="${profilePath}/user-overrides.js" local otherCustomPath="${profilePath}/chrome/user-overrides.js" - apply_custom_file "${LEPTONGITPATH}" "${targetPath}" "${customPath}" "${otherCustomPath}" + apply_custom_file "${profilePath}" "${targetPath}" "${customPath}" "${otherCustomPath}" else - apply_custom_file "${LEPTONGITPATH}" "${profilePath}/chrome/${targetFile}" "${profilePath}/chrome/${customFile}" + apply_custom_file "${profilePath}" "${profilePath}/chrome/${targetFile}" "${profilePath}/chrome/${customFile}" fi done done From b1bd85d869059bea73f3ed50c56c2e0569edc959 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 22 Apr 2022 16:15:54 +0900 Subject: [PATCH 29/39] Clean: Install - `*File` -> `*Path` at apply_custom_file --- install.ps1 | 22 +++++++++++----------- install.sh | 24 ++++++++++++------------ 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/install.ps1 b/install.ps1 index 23330cc..535a5a6 100644 --- a/install.ps1 +++ b/install.ps1 @@ -720,15 +720,15 @@ function Apply-CustomFile() { [Parameter(Mandatory=$true, Position=0)] [string] $profilePath, [Parameter(Mandatory=$true, Position=1)] - [string] $targetFile, + [string] $targetPath, [Parameter(Mandatory=$true, Position=2)] - [string] $customFile, + [string] $customPath, [Parameter(Position=3)] - [string] $otherCustom = "" + [string] $otherCustomPath = "" ) $local:gitDir = "${profilePath}\chrome\.git" - if ( Test-Path -Path "${customFile}" -PathType leaf ) { + if ( Test-Path -Path "${customPath}" -PathType leaf ) { $global:customFileApplied = $true if ( "${customMethod}" -eq "" ) { @@ -736,22 +736,22 @@ function Apply-CustomFile() { } if ( "${customReset}" -eq $true ) { - if ( "${targetFile}" -like "*user.js" ) { - Copy-Item -Path "${customFile}" -Destination "${targetFile}" -Force + if ( "${targetPath}" -like "*user.js" ) { + Copy-Item -Path "${customFile}" -Destination "${targetPath}" -Force } else { - git --git-dir "${gitDir}" --quiet checkout HEAD -- "${targetFile}" + git --git-dir "${gitDir}" --quiet checkout HEAD -- "${targetPath}" } } if ( "${customAppend}" -eq $true ) { # Apply without duplication - if ( -not (Write-Output "$(Write-Output $(Get-Content -Path "${targetFile}"))" | Select-String -Pattern "$(Write-Output $(Get-Content -Path "${customFile}"))" -SimpleMatch -Quiet) ) { - Get-Content -Path "${customFile}" | Out-File -FilePath "${targetFile}" -Append + if ( -not (Write-Output "$(Write-Output $(Get-Content -Path "${targetPath}"))" | Select-String -Pattern "$(Write-Output $(Get-Content -Path "${customPath}"))" -SimpleMatch -Quiet) ) { + Get-Content -Path "${customPath}" | Out-File -FilePath "${targetPath}" -Append } } } - elseif ( "${otherCustom}" -ne "" ) { - Apply-CustomFile "${profilePath}" "${targetFile}" "${otherCustom}" + elseif ( "${otherCustomPath}" -ne "" ) { + Apply-CustomFile "${profilePath}" "${targetPath}" "${otherCustomPath}" } } diff --git a/install.sh b/install.sh index ad8c568..870f065 100755 --- a/install.sh +++ b/install.sh @@ -696,33 +696,33 @@ set_custom_method() { customFileApplied="" apply_custom_file() { local profilePath=$1 - local targetFile=$2 - local customFile=$3 - local otherCustom=$4 + local targetPath=$2 + local customPath=$3 + local otherCustomPath=$4 local gitDir="${profilePath}/chrome/.git" - if [ -f "${customFile}" ]; then - customFileApplied="true" + if [ -f "${customPath}" ]; then + customPathApplied="true" if [ -z "${customMethod}" ]; then set_custom_method fi if [ "${customReset}" == "true" ]; then - if [[ "${targetFile}" == *"user.js" ]]; then - \cp -f "${profilePath}/chrome/user.js" "${targetFile}" + if [[ "${targetPath}" == *"user.js" ]]; then + \cp -f "${profilePath}/chrome/user.js" "${targetPath}" else - git --git-dir "${gitDir}" --quiet checkout HEAD -- "${targetFile}" + git --git-dir "${gitDir}" --quiet checkout HEAD -- "${targetPath}" fi fi if [ "${customAppend}" == "true" ]; then # Apply without duplication - if ! grep -Fq "$(echo $(cat "${customFile}"))" <(echo "$(echo $(cat "${targetFile}"))"); then - cat "${customFile}" >> "${targetFile}" + if ! grep -Fq "$(echo $(cat "${customPath}"))" <(echo "$(echo $(cat "${targetPath}"))"); then + cat "${customPath}" >> "${targetPath}" fi fi - elif [ -n "${otherCustom}" ]; then - apply_custom_file "${profilePath}" "${targetFile}" "${otherCustom}" + elif [ -n "${otherCustomPath}" ]; then + apply_custom_file "${profilePath}" "${targetPath}" "${otherCustomPath}" fi } From 4221cee30a74ca51ac22d6197874ce36a2203884 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 22 Apr 2022 16:41:37 +0900 Subject: [PATCH 30/39] Fix: Install - Git quiet option --- install.ps1 | 4 ++-- install.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install.ps1 b/install.ps1 index 535a5a6..5c4b1b1 100644 --- a/install.ps1 +++ b/install.ps1 @@ -740,7 +740,7 @@ function Apply-CustomFile() { Copy-Item -Path "${customFile}" -Destination "${targetPath}" -Force } else { - git --git-dir "${gitDir}" --quiet checkout HEAD -- "${targetPath}" + git --git-dir "${gitDir}" checkout HEAD -- "${targetPath}" } } if ( "${customAppend}" -eq $true ) { @@ -894,7 +894,7 @@ function Restore-File() { ) if ( "${gitDirty}" -eq $true ) { - git --git-dir "${gitDir}" checkout stash pop + git --git-dir "${gitDir}" checkout stash pop --quiet } } diff --git a/install.sh b/install.sh index 870f065..a8afb77 100755 --- a/install.sh +++ b/install.sh @@ -712,7 +712,7 @@ apply_custom_file() { if [[ "${targetPath}" == *"user.js" ]]; then \cp -f "${profilePath}/chrome/user.js" "${targetPath}" else - git --git-dir "${gitDir}" --quiet checkout HEAD -- "${targetPath}" + git --git-dir "${gitDir}" checkout HEAD -- "${targetPath}" fi fi if [ "${customAppend}" == "true" ]; then @@ -852,7 +852,7 @@ file_restore() { local gitDir=$1 local gitDirty=$2 if [ -n "${gitDirty}" ]; then - git --git-dir "${gitDir}" --quiet stash pop + git --git-dir "${gitDir}" stash pop --quiet fi } From f557922882485614fa408a72fe165ac6c2cdfeb1 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 22 Apr 2022 20:02:36 +0900 Subject: [PATCH 31/39] Fix: Install - git Worktree option --- install.sh | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/install.sh b/install.sh index a8afb77..bbcdaeb 100755 --- a/install.sh +++ b/install.sh @@ -712,7 +712,7 @@ apply_custom_file() { if [[ "${targetPath}" == *"user.js" ]]; then \cp -f "${profilePath}/chrome/user.js" "${targetPath}" else - git --git-dir "${gitDir}" checkout HEAD -- "${targetPath}" + git --git-dir "${gitDir}" --work-tree "${profilePath}/chrome" checkout HEAD -- "${targetPath}" fi fi if [ "${customAppend}" == "true" ]; then @@ -842,17 +842,16 @@ install_profile() { #** Update ********************************************************************* file_stash() { - # use as: local gitDirty="$(file_stash GIT_PATH)" - gitDir=$1 - if [[ $(git --git-dir "${gitDir}" diff --stat) != '' ]]; then - git --git-dir "${gitDir}" stash + profilePath=$1 + if [[ $(git --git-dir "${profilePath}/.git" --work-tree "${profilePath}/chrome" diff --stat) != '' ]]; then + git --git-dir "${profilePath}/chrome/.git" --work-tree "${profilePath}/chrome" stash fi } file_restore() { - local gitDir=$1 + local profilePath=$1 local gitDirty=$2 if [ -n "${gitDirty}" ]; then - git --git-dir "${gitDir}" stash pop --quiet + git --git-dir "${profilePath}/chrome/.git" --work-tree "${profilePath}/chrome" stash pop --quiet fi } @@ -871,10 +870,10 @@ update_profile() { if [ "${Type}" == "Git" ]; then local gitDirty="$(file_stash ${LEPTONGITPATH})" - git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" - git --git-dir "${LEPTONGITPATH}" pull --no-edit + git --git-dir "${LEPTONGITPATH}" --work-tree "${Path}/chrome" checkout "${Branch}" + git --git-dir "${LEPTONGITPATH}" --work-tree "${Path}/chrome" pull --no-edit - file_restore "${LEPTONGITPATH}" "${gitDirty}" + file_restore "${Path}" "${gitDirty}" elif [ "${Type}" == "Local" ] || [ "${Type}" == "Release" ]; then check_chrome_exist clone_lepton @@ -885,11 +884,11 @@ update_profile() { if [ -z "${Branch}" ]; then Branch="${leptonBranch}" fi - git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" + git --git-dir "${LEPTONGITPATH}" --work-tree "${Path}/chrome" checkout "${Branch}" if [ "${Type}" == "Release" ]; then local Ver=$(git --git-dir "${LEPTONINFOFILE}" describe --tags --abbrev=0) - git --git-dir "${LEPTONGITPATH}" checkout "tags/${Ver}" + git --git-dir "${LEPTONGITPATH}" --work-tree "${Path}/chrome" checkout "tags/${Ver}" fi clean_lepton From 5216110ba5cc675e11806a435751366e8f50fc20 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 22 Apr 2022 22:37:05 +0900 Subject: [PATCH 32/39] Clean: Install - leptonDir --- install.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/install.sh b/install.sh index bbcdaeb..1897292 100755 --- a/install.sh +++ b/install.sh @@ -700,7 +700,8 @@ apply_custom_file() { local customPath=$3 local otherCustomPath=$4 - local gitDir="${profilePath}/chrome/.git" + local leptonDir="${profilePath}/chrome" + local gitDir="${leptonDir}/.git" if [ -f "${customPath}" ]; then customPathApplied="true" @@ -710,9 +711,9 @@ apply_custom_file() { if [ "${customReset}" == "true" ]; then if [[ "${targetPath}" == *"user.js" ]]; then - \cp -f "${profilePath}/chrome/user.js" "${targetPath}" + \cp -f "${leptonDir}/user.js" "${targetPath}" else - git --git-dir "${gitDir}" --work-tree "${profilePath}/chrome" checkout HEAD -- "${targetPath}" + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout HEAD -- "${targetPath}" fi fi if [ "${customAppend}" == "true" ]; then @@ -842,7 +843,7 @@ install_profile() { #** Update ********************************************************************* file_stash() { - profilePath=$1 + local profilePath=$1 if [[ $(git --git-dir "${profilePath}/.git" --work-tree "${profilePath}/chrome" diff --stat) != '' ]]; then git --git-dir "${profilePath}/chrome/.git" --work-tree "${profilePath}/chrome" stash fi @@ -866,12 +867,13 @@ update_profile() { local Branch=$(get_ini_value "${LEPTONINFOPATH}" "Branch" "${section}") local Path=$( get_ini_value "${LEPTONINFOPATH}" "Path" "${section}") - local LEPTONGITPATH="${Path}/chrome/.git" + local leptonDir="${Path}/chrome" + local gitDir="${leptonDir}/.git" if [ "${Type}" == "Git" ]; then - local gitDirty="$(file_stash ${LEPTONGITPATH})" + local gitDirty="$(file_stash ${gitDir})" - git --git-dir "${LEPTONGITPATH}" --work-tree "${Path}/chrome" checkout "${Branch}" - git --git-dir "${LEPTONGITPATH}" --work-tree "${Path}/chrome" pull --no-edit + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout "${Branch}" + git --git-dir "${gitDir}" --work-tree "${leptonDir}" pull --no-edit file_restore "${Path}" "${gitDirty}" elif [ "${Type}" == "Local" ] || [ "${Type}" == "Release" ]; then @@ -884,11 +886,11 @@ update_profile() { if [ -z "${Branch}" ]; then Branch="${leptonBranch}" fi - git --git-dir "${LEPTONGITPATH}" --work-tree "${Path}/chrome" checkout "${Branch}" + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout "${Branch}" if [ "${Type}" == "Release" ]; then local Ver=$(git --git-dir "${LEPTONINFOFILE}" describe --tags --abbrev=0) - git --git-dir "${LEPTONGITPATH}" --work-tree "${Path}/chrome" checkout "tags/${Ver}" + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout "tags/${Ver}" fi clean_lepton From a021cdf509324e0316fd6a630baf4db36eecf9ab Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 23 Apr 2022 00:13:55 +0900 Subject: [PATCH 33/39] Fix: Install - port to powershell --- install.ps1 | 44 +++++++++++++++++++++++++------------------- install.sh | 18 ++++++++++-------- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/install.ps1 b/install.ps1 index 5c4b1b1..4be7cda 100644 --- a/install.ps1 +++ b/install.ps1 @@ -727,7 +727,8 @@ function Apply-CustomFile() { [string] $otherCustomPath = "" ) - $local:gitDir = "${profilePath}\chrome\.git" + $local:leptonDir = "${profilePath}\chrome" + $local:gitDir = "${leptonDir}\.git" if ( Test-Path -Path "${customPath}" -PathType leaf ) { $global:customFileApplied = $true @@ -737,10 +738,10 @@ function Apply-CustomFile() { if ( "${customReset}" -eq $true ) { if ( "${targetPath}" -like "*user.js" ) { - Copy-Item -Path "${customFile}" -Destination "${targetPath}" -Force + Copy-Item -Path "${leptonDir}\user.js" -Destination "${targetPath}" -Force } else { - git --git-dir "${gitDir}" checkout HEAD -- "${targetPath}" + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout HEAD -- "${targetPath}" } } if ( "${customAppend}" -eq $true ) { @@ -875,26 +876,30 @@ function Install-Profile() { #** Update ********************************************************************* function Stash-File() { Param ( - [Parameter(Position=0)] - [string] $gitDir = ".git" + [Parameter(Mandatory=$true, Position=0)] + [string] $leptonDir, + [Parameter(Mandatory=$true, Position=1)] + [string] $gitDir ) - if ( "$(git --git-dir "${gitDir}" diff --stat)" -ne '' ) { - git --git-dir "${gitDir}" checkout stash + if ( "$(git --git-dir "${gitDir}" --work-tree "${leptonDir}" diff --stat)" -ne '' ) { + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout stash return $true } return $false } function Restore-File() { Param ( - [Parameter(Position=0)] - [string] $gitDir = ".git", - [Parameter(Position=1)] + [Parameter(Mandatory=$true, Position=0)] + [string] $leptonDir, + [Parameter(Mandatory=$true, Position=1)] + [string] $gitDir, + [Parameter(Position=2)] [switch] $gitDirty = $false ) if ( "${gitDirty}" -eq $true ) { - git --git-dir "${gitDir}" checkout stash pop --quiet + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout stash pop --quiet } } @@ -910,14 +915,15 @@ function Update-Profile() { $local:Branch = $LEPTONINFO["${section}"]["Branch"] $local:Path = $LEPTONINFO["${section}"]["Path"] - $local:LEPTONGITPATH="${Path}\chrome\.git" + $local:leptonDir = "${Path}\chrome" + $local:gitDir = "${leptonDir}\.git" if ( "${Type}" -eq "Git" ) { - $local:gitDirty = $(Stash-File "${LEPTONGITPATH}") + $local:gitDirty = $(Stash-File "${leptonDir}" "${gitDir}") - git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" - git --git-dir "${LEPTONGITPATH}" pull --no-edit + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout "${Branch}" + git --git-dir "${gitDir}" --work-tree "${leptonDir}" pull --no-edit - Restore-File "${LEPTONGITPATH}" $gitDirty + Restore-File "${leptonDir}" "${gitDir}" $gitDirty } elseif ( "${Type}" -eq "Local" -or "${Type}" -eq "Release" ) { Check-ChromeExist @@ -929,11 +935,11 @@ function Update-Profile() { if ( "${Branch}" -eq $null ) { $Branch = "${leptonBranch}" } - git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout "${Branch}" if ( "${Type}" -eq "Release" ) { - $local:Ver=$(git --git-dir "${LEPTONINFOFILE}" describe --tags --abbrev=0) - git --git-dir "${LEPTONGITPATH}" checkout "tags/${Ver}" + $local:Ver=$(git --git-dir "${gitDir}" describe --tags --abbrev=0) + git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout "tags/${Ver}" } Clean-Lepton diff --git a/install.sh b/install.sh index 1897292..ad9823f 100755 --- a/install.sh +++ b/install.sh @@ -843,16 +843,18 @@ install_profile() { #** Update ********************************************************************* file_stash() { - local profilePath=$1 - if [[ $(git --git-dir "${profilePath}/.git" --work-tree "${profilePath}/chrome" diff --stat) != '' ]]; then - git --git-dir "${profilePath}/chrome/.git" --work-tree "${profilePath}/chrome" stash + local leptonDir=$1 + local gitDir=$2 + if [[ $(git --git-dir "${gitDir}" --work-tree "${leptonDir}" diff --stat) != '' ]]; then + git --git-dir "${gitDir}" --work-tree "${leptonDir}" stash fi } file_restore() { - local profilePath=$1 - local gitDirty=$2 + local leptonDir=$1 + local gitDir=$2 + local gitDirty=$3 if [ -n "${gitDirty}" ]; then - git --git-dir "${profilePath}/chrome/.git" --work-tree "${profilePath}/chrome" stash pop --quiet + git --git-dir "${gitDir}" --work-tree "${leptonDir}" stash pop --quiet fi } @@ -870,12 +872,12 @@ update_profile() { local leptonDir="${Path}/chrome" local gitDir="${leptonDir}/.git" if [ "${Type}" == "Git" ]; then - local gitDirty="$(file_stash ${gitDir})" + local gitDirty=$(file_stash "${leptonDir}" "${gitDir}") git --git-dir "${gitDir}" --work-tree "${leptonDir}" checkout "${Branch}" git --git-dir "${gitDir}" --work-tree "${leptonDir}" pull --no-edit - file_restore "${Path}" "${gitDirty}" + file_restore "${leptonDir}" "${gitDir}" "${gitDirty}" elif [ "${Type}" == "Local" ] || [ "${Type}" == "Release" ]; then check_chrome_exist clone_lepton From 477f899f591edf1d1b41b23d9cc3224610bc53e5 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 23 Apr 2022 01:30:59 +0900 Subject: [PATCH 34/39] Fix: Install - Powershell `Get-Command` error message remove --- install.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.ps1 b/install.ps1 index 4be7cda..7316347 100644 --- a/install.ps1 +++ b/install.ps1 @@ -99,8 +99,8 @@ function Install-Choco() { } function Check-Git() { - if( -Not (Get-Command git) ) { - if ( -Not (Get-Command choco)) { + if ( -Not (Get-Command git -errorAction SilentlyContinue) ) { + if ( -Not (Get-Command choco -errorAction SilentlyContinue) ) { Install-Choco } choco install git -y From 938685424ce3f7a88dcdb3b68a55da6571a2122c Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 23 Apr 2022 01:35:53 +0900 Subject: [PATCH 35/39] Fix: Install - Choco portable for non admin --- install.ps1 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.ps1 b/install.ps1 index 7316347..f3ce956 100644 --- a/install.ps1 +++ b/install.ps1 @@ -92,10 +92,14 @@ function Verify-PowerShellVersion { #== Required Tools ============================================================= function Install-Choco() { # https://chocolatey.org/install + # https://docs.chocolatey.org/en-us/choco/setup#non-administrative-install + $InstallDir='C:\ProgramData\chocoportable' + $env:ChocolateyInstall="$InstallDir" + Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) - $env:Path += ";C:\ProgramData\chocolatey" + $env:Path += ";C:\ProgramData\chocoportable'" } function Check-Git() { @@ -103,7 +107,7 @@ function Check-Git() { if ( -Not (Get-Command choco -errorAction SilentlyContinue) ) { Install-Choco } - choco install git -y + choco install git.commandline -y $env:Path += ";C:\Program Files\Git\bin" } From 8801366f2705aecb4f9791b0fe1c00ef9c1d330b Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 23 Apr 2022 01:41:47 +0900 Subject: [PATCH 36/39] Fix: Install - choco path --- install.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install.ps1 b/install.ps1 index f3ce956..85d8bd2 100644 --- a/install.ps1 +++ b/install.ps1 @@ -99,7 +99,7 @@ function Install-Choco() { Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) - $env:Path += ";C:\ProgramData\chocoportable'" + $env:Path += ";C:\ProgramData\chocoportable" } function Check-Git() { From a593a21dcba7d365dfe76bd3566ecf2bb6bafaa6 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 23 Apr 2022 02:05:29 +0900 Subject: [PATCH 37/39] Fix: Install - choco git install path for non adimin --- install.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/install.ps1 b/install.ps1 index 85d8bd2..46f1123 100644 --- a/install.ps1 +++ b/install.ps1 @@ -99,7 +99,8 @@ function Install-Choco() { Set-ExecutionPolicy Bypass -Scope Process -Force [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) - $env:Path += ";C:\ProgramData\chocoportable" + $env:Path += ";C:\ProgramData\chocoportable" # Adimin: ";C:\ProgramData\chocolatey" + refreshenv } function Check-Git() { @@ -108,7 +109,8 @@ function Check-Git() { Install-Choco } choco install git.commandline -y - $env:Path += ";C:\Program Files\Git\bin" + $env:Path += ";C:\tools\git\bin" # Adimin: ";C:\Program Files\Git\bin" + refreshenv } Lepton-OKMessage "Required - git" From eace1e282a29f5a637681c604c74604580b8b500 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 23 Apr 2022 16:57:30 +0900 Subject: [PATCH 38/39] Doc: README - Win7 powershell compatibility --- README.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.org b/README.org index 161c53a..50e5ccc 100644 --- a/README.org +++ b/README.org @@ -73,7 +73,7 @@ It's in beta testing, and I'am looking forward to hearing from you. - Unselect: - Divide Line: React to hover like chrome - Unloaded: - - Dimmed: Looks like inactive + - Dimmed: Looks like inactive - Clipped: - Clearer Text: Adjusted clipped gradation - Closed Button: Visible on hover @@ -114,7 +114,7 @@ It's in beta testing, and I'am looking forward to hearing from you. bash -c "$(curl -fsSL https://raw.githubusercontent.com/black7375/Firefox-UI-Fix/master/install.sh)" #+END_SRC - Windows users: Run with powershell +Windows users: Run with powershell ([[https://github.com/black7375/Firefox-UI-Fix/wiki/Compatibility-Issues-Solution#windows-7-powershell-script-not-works][Does not work at Win7?]]) #+BEGIN_SRC powershell Powershell -c "Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://raw.githubusercontent.com/black7375/Firefox-UI-Fix/master/install.ps1 -useb | iex" #+END_SRC From 12beb14bc39c94ec5cb38db168831931c29bcab9 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 23 Apr 2022 17:40:46 +0900 Subject: [PATCH 39/39] Doc: Restrictions - Import --- docs/Restrictions.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/Restrictions.md b/docs/Restrictions.md index cd4eb0c..9b5b247 100644 --- a/docs/Restrictions.md +++ b/docs/Restrictions.md @@ -12,6 +12,7 @@ * [Shadow DOM](#shadow-dom) * [XUL](#xul) * [Namespace](#namespace) + * [Import](#import) @@ -162,3 +163,33 @@ If you want to limit the coverage to some pages, you can use [`@-moz-document`]( /* Your CSS */ } ``` + +### Import +There are a few caveats when you [`@import`](https://developer.mozilla.org/en-US/docs/Web/CSS/@import) the CSS. +It's because of specification definition, not Firefox design, but to prevent some mistakes. + +`@import` rule is not a [nested statement](https://developer.mozilla.org/en-US/docs/Web/CSS/Syntax#nested_statements). Therefore, it cannot be used inside [conditional group at-rules](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule#conditional_group_rules). + +```css +/* Precede */ +@import url("YourFile.css"); /* Works */ + +/* Nested */ +@supports -moz-bool-pref("userChrome.test.pref") { + @import url("AnotherFile.css"); /* Not Works */ +} +``` + +Any [`@namespace`](https://developer.mozilla.org/en-US/docs/Web/CSS/@namespace) rules must follow all `@charset` and @import rules, and precede all other at-rules and style declarations in a style sheet. + +```css +/* Before - Namespace */ +@import url("YourFile.css"); /* Works */ + +/* Declare - Namespace */ +@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +/* After - Namespace */ +@import url("YourFile.css"); /* Not Works */ +```