From 610350d6a20c7269140dd3c0b57c9a29c2e3f59f Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 14 Jun 2021 11:42:46 +0900 Subject: [PATCH 01/71] Clean: Panel - Comments divide line --- userChrome.css | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/userChrome.css b/userChrome.css index 336692b..aa34eaa 100644 --- a/userChrome.css +++ b/userChrome.css @@ -545,7 +545,7 @@ } /** Panel - Icons ***********************************************************/ - /* Padding */ + /*= Padding ================================================================*/ :root { --arrowpanel-menublank-padding: calc(var(--arrowpanel-menuicon-padding) * 2 + 8px) !important; --arrowpanel-menuimageblank-padding: calc(var(--arrowpanel-menuitem-padding) - 2px) !important; @@ -596,7 +596,7 @@ -moz-context-properties: fill !important; } - /* Panel - Main */ + /*= Panel - Main ===========================================================*/ #appMenu-proton-addon-banners > .addon-banner-item > .toolbarbutton-icon { display: -moz-inline-box !important; margin-inline-start: var(--arrowpanel-menuicon-padding); @@ -673,7 +673,7 @@ list-style-image: url(chrome://browser/skin/quit.svg); } - /* Panel - Account */ + /*= Panel - Account ========================================================*/ #PanelUI-fxa-menu-connect-device-button .toolbarbutton-icon, #PanelUI-fxa-menu-account-signout-button .toolbarbutton-icon { width: 16px !important; @@ -735,7 +735,7 @@ list-style-image: url(chrome://global/skin/icons/settings.svg); } - /* Panel - Bookmark */ + /*= Panel - Bookmark =======================================================*/ #panelMenuBookmarkThisPage { list-style-image: url(chrome://browser/skin/bookmark-hollow.svg); } @@ -754,7 +754,7 @@ list-style-image: url(chrome://browser/skin/bookmark-star-on-tray.svg); } - /* Panel - History */ + /*= Panel - History ========================================================*/ #appMenuRecentlyClosedTabs { list-style-image: url(chrome://browser/skin/tab.svg); } @@ -779,7 +779,7 @@ list-style-image: url(chrome://browser/skin/restore-session.svg); } - /* Panel - More tools */ + /*= Panel - More tools =====================================================*/ #appmenu-moreTools-button { list-style-image: url(chrome://browser/skin/customize.svg); } @@ -818,7 +818,7 @@ margin-bottom: 6px !important; } - /* Panel - Help */ + /*= Panel - Help ===========================================================*/ #appMenu_menu_openHelp { list-style-image: url(chrome://global/skin/icons/help.svg); } @@ -841,7 +841,7 @@ list-style-image: url(chrome://global/skin/icons/info.svg); } - /* Panel - Library */ + /*= Panel - Library ========================================================*/ #appMenu-library-bookmarks-button { list-style-image: url(chrome://browser/skin/bookmark.svg); } @@ -852,17 +852,17 @@ list-style-image: url(chrome://browser/skin/downloads/downloads.svg); } - /* Panel - Downloads */ + /*= Panel - Downloads ======================================================*/ #downloadsHistory { list-style-image: url(chrome://browser/skin/downloads/downloads.svg); } - /* Toolbar - Overflow Menu */ + /*= Toolbar - Overflow Menu ================================================*/ #overflowMenu-customize-button { list-style-image: url(chrome://browser/skin/customize.svg); } - /* All Tab Menu */ + /*= Tabbar - All Tab Menu ==================================================*/ #allTabsMenu-undoCloseTab { list-style-image: url(chrome://global/skin/icons/undo.svg); } From bfd60acfa7990584ab34a5c3e34aa7458efb94a9 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 14 Jun 2021 11:51:30 +0900 Subject: [PATCH 02/71] Add: Context Menu - tab context icons --- userChrome.css | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/userChrome.css b/userChrome.css index aa34eaa..6e9ac74 100644 --- a/userChrome.css +++ b/userChrome.css @@ -880,4 +880,57 @@ #allTabsMenu-containerTabsView .subviewbutton:last-child { list-style-image: url(chrome://global/skin/icons/settings.svg); } + + /** Context Menu - Icons ****************************************************/ + /*= tabContextMenu =========================================================*/ + #context_openANewTab { + background-image: url(chrome://browser/skin/new-tab.svg) !important; + } + + #context_reloadTab, + #context_reloadSelectedTabs { + background-image: url(chrome://browser/skin/reload.svg); + } + #context_toggleMuteTab, + #context_toggleMuteSelectedTabs { + background-image: url(chrome://browser/skin/tabbrowser/tab-audio-muted-small.svg); + } + #context_toggleMuteTab[muted], + #context_toggleMuteSelectedTabs[muted] { + background-image: url(chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg); + } + #context_pinTab, + #context_pinSelectedTabs { + background-image: url(chrome://browser/skin/pin-12.svg); + } + #context_unpinTab, + #context_unpinSelectedTabs { + } + #context_duplicateTab, + #context_duplicateTabs { + } + + #context_bookmarkTab, + #context_bookmarkSelectedTabs { + background-image: url(chrome://browser/skin/bookmark.svg); + } + #context_moveTabOptions { + } + #context_sendTabToDevice { + background-image: url(chrome://browser/skin/send-to-device.svg); + } + #context_reopenInContainer { + background-image: url(./icons/container-openin-16.svg); + } + #context_selectAllTabs { + } + + #context_closeTab { + background-image: url(chrome://global/skin/icons/close.svg); + } + #context_closeTabOptions { + } + #context_undoCloseTab { + background-image: url(chrome://global/skin/icons/undo.svg); + } } From dfe4a83dc39afae72c84888b8869ebc58bb417ba Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 14 Jun 2021 12:18:32 +0900 Subject: [PATCH 03/71] Add: firefox88 icons from @mozilla 's geckto-dev --- icons/pin-tab.svg | 6 ++++++ icons/tab.svg | 6 ++++++ icons/unpin-tab.svg | 6 ++++++ 3 files changed, 18 insertions(+) create mode 100644 icons/pin-tab.svg create mode 100644 icons/tab.svg create mode 100644 icons/unpin-tab.svg diff --git a/icons/pin-tab.svg b/icons/pin-tab.svg new file mode 100644 index 0000000..1f951a3 --- /dev/null +++ b/icons/pin-tab.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/icons/tab.svg b/icons/tab.svg new file mode 100644 index 0000000..1d13dd1 --- /dev/null +++ b/icons/tab.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/icons/unpin-tab.svg b/icons/unpin-tab.svg new file mode 100644 index 0000000..bd2b382 --- /dev/null +++ b/icons/unpin-tab.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file From 87ae4c9efa08020d2beefdc39981ce7259dee909 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 14 Jun 2021 15:57:11 +0900 Subject: [PATCH 04/71] Add: Context Menu - new tab button popup, bloacked popup, autohide-context icons --- userChrome.css | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/userChrome.css b/userChrome.css index 6e9ac74..a7fd44a 100644 --- a/userChrome.css +++ b/userChrome.css @@ -901,10 +901,11 @@ } #context_pinTab, #context_pinSelectedTabs { - background-image: url(chrome://browser/skin/pin-12.svg); + background-image: url(./icons/pin-tab.svg); } #context_unpinTab, #context_unpinSelectedTabs { + background-image: url(./icons/unpin-tab.svg); } #context_duplicateTab, #context_duplicateTabs { @@ -933,4 +934,28 @@ #context_undoCloseTab { background-image: url(chrome://global/skin/icons/undo.svg); } + + /*= new-tab-button-popup ===================================================*/ + #new-tab-button-popup > menuitem[command="Browser:OpenAboutContainers"] { + background-image: url(chrome://global/skin/icons/settings.svg); + } + + /*= blockedPopupOptions ====================================================*/ + #blockedPopupAllowSite { + background-image: url("chrome://global/skin/icons/check.svg"); + } + #blockedPopupOptions > menuitem[oncommand="gPopupBlockerObserver.editPopupSettings();"] { + background-image: url("chrome://global/skin/icons/edit.svg"); + } + #blockedPopupDontShowMessage { /* checkbox */ + background-image: url("chrome://global/skin/icons/blocked.svg"); + } + + /*= autohide-context =======================================================*/ + #autohide-context > menuitem[data-l10n-id="full-screen-autohide"] { /* checkbox */ + } + + #autohide-context > menuitem[data-l10n-id="full-screen-exit"] { + background-image: url(chrome://browser/skin/fullscreen-exit.svg); + } } From ad5cb44948973fd73ba79ca938fda5669a05f5e3 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 15 Jun 2021 10:42:12 +0900 Subject: [PATCH 05/71] Add: Context Menu - toolbar context menu icons --- userChrome.css | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/userChrome.css b/userChrome.css index a7fd44a..4aa04af 100644 --- a/userChrome.css +++ b/userChrome.css @@ -940,6 +940,47 @@ background-image: url(chrome://global/skin/icons/settings.svg); } + /*= toolbar-context-menu ===================================================*/ + .customize-context-manageExtension { + background-image: url(chrome://global/skin/icons/settings.svg); + } + .customize-context-removeExtension { + background-image: url(chrome://global/skin/icons/delete.svg); + } + .customize-context-reportExtension { + background-image: url(./icons/send.svg); + } + + .customize-context-moveToPanel { + background-image: url(chrome://browser/skin/pin-12.svg); + } + .toolbar-context-autohide-downloads-button { + } + .customize-context-removeFromToolbar { + background-image: url(chrome://global/skin/icons/delete.svg); + } + #toolbar-context-openANewTab { + background-image: url(chrome://browser/skin/new-tab.svg); + } + + #toolbar-context-reloadSelectedTab, + #toolbar-context-reloadSelectedTabs { + background-image: url(chrome://browser/skin/reload.svg); + } + #toolbar-context-bookmarkSelectedTab, + #toolbar-context-bookmarkSelectedTabs { + background-image: url(chrome://browser/skin/bookmark.svg); + } + #toolbar-context-selectAllTabs { + } + #toolbar-context-undoCloseTab { + background-image: url(chrome://global/skin/icons/undo.svg); + } + + #viewCustomizeToolbar { + background-image: url(chrome://browser/skin/customize.svg); + } + /*= blockedPopupOptions ====================================================*/ #blockedPopupAllowSite { background-image: url("chrome://global/skin/icons/check.svg"); From 72c78e2ee88e28d73b5e8780778716b68e1f86f2 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 16 Jun 2021 14:22:29 +0900 Subject: [PATCH 06/71] Fix: Tab Bar - Scroll button size increse #95 --- userChrome.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/userChrome.css b/userChrome.css index 8a94e88..54da386 100644 --- a/userChrome.css +++ b/userChrome.css @@ -166,6 +166,8 @@ :root:not([uidensity=touch]) #tabbrowser-arrowscrollbox { --scrollbtn-vertical-padding: 3px; + --scrollbtn-vertical-border: 2px; + --scrollbtn-border-radius: 7px; } #scrollbutton-up, #scrollbutton-down { @@ -173,6 +175,12 @@ /* https://github.com/mozilla/gecko-dev/blob/71b1259afd1cdaf41871ae675c2dadb967ea5b34/browser/themes/shared/toolbarbuttons.inc.css#L142 */ padding-top: var(--scrollbtn-vertical-padding, var(--toolbarbutton-inner-padding)) !important; padding-bottom: var(--scrollbtn-vertical-padding, var(--toolbarbutton-inner-padding)) !important; + + /* Original: 4px */ + border-top-width: var(--scrollbtn-vertical-border, 4px) !important; + border-bottom-width: var(--scrollbtn-vertical-border, 4px) !important; + /* Original: calc(var(--tab-border-radius) + 4px) = 8px */ + border-radius: var(--scrollbtn-border-radius, calc(var(--tab-border-radius) + 4px)) !important; } :root[tabsintitlebar]:not([uidensity=compact]) #toolbar-menubar[autohide="true"] { From b41e78531782a42c576a90ea8b09e7f8ecdd75f1 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 17 Jun 2021 10:18:50 +0900 Subject: [PATCH 07/71] Revert "Merge pull request #93 from 7k5x/installer" This reverts commit 35f40be7a8fa94d95a3633eb4116e1afec18a7e8, reversing changes made to f20b74a2843ba335eeb6419a42adf9f7581c3402. --- .gitattributes | 3 +- .github/workflows/shellcheck.yml | 18 ------ CREDITS | 1 - Install.sh | 19 ++++++ install.sh | 107 ------------------------------- 5 files changed, 21 insertions(+), 127 deletions(-) delete mode 100644 .github/workflows/shellcheck.yml create mode 100755 Install.sh delete mode 100644 install.sh diff --git a/.gitattributes b/.gitattributes index ed814f1..498a943 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,5 @@ /.gitattributes export-ignore +/.gitignore export-ignore /.github export-ignore /CODE_OF_CONDUCT.md export-ignore -/README.org export-ignore \ No newline at end of file +/README.org export-ignore diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml deleted file mode 100644 index c1c8c94..0000000 --- a/.github/workflows/shellcheck.yml +++ /dev/null @@ -1,18 +0,0 @@ -on: - push: - branches: - - master - - photon-style - pull_request: - branches: - - master -name: 'ShellCheck' - -jobs: - shellcheck: - name: Shellcheck - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Run ShellCheck - uses: ludeeus/action-shellcheck@master diff --git a/CREDITS b/CREDITS index b9a608b..7ee9e72 100644 --- a/CREDITS +++ b/CREDITS @@ -66,7 +66,6 @@ W: https://github.com/medhefgo Contributors N: 7k5x -E: 7k5xlp0onfire@gmail.com W: https://github.com/7k5x N: Burak Yigit Kaya diff --git a/Install.sh b/Install.sh new file mode 100755 index 0000000..e87dcfd --- /dev/null +++ b/Install.sh @@ -0,0 +1,19 @@ +autocopy() { + local file=${1} + local target=${2} + + if [ -e "${target}" ]; then + echo "${target} alreay exist." + echo "Now Backup.." + autocopy "${target}" "${target}.bak" + echo"" + fi + + cp -v "${file}" "${target}" +} + +install_lepton() { + local userConfig="user.js" + autocopy "${userConfig}" "../${userConfig}" +} +install_lepton diff --git a/install.sh b/install.sh deleted file mode 100644 index ce0f73b..0000000 --- a/install.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env bash -# shellcheck disable=SC2185 -function copychrome(){ - \cp -f userChrome.css ~/.mozilla/firefox/"$1"/chrome/userChrome.css - \cp -f userContent.css ~/.mozilla/firefox/"$1"/chrome/userContent.css - \cp -f -r icons ~/.mozilla/firefox/"$1"/chrome/ -} -function backupchrome(){ - if [ -f ~/.mozilla/firefox/"$1"/chrome/userChrome.css ];then - \mv -f ~/.mozilla/firefox/"$1"/chrome/userChrome.css ~/.mozilla/firefox/"$1"/chrome/userChrome.css.bak - \mv -f ~/.mozilla/firefox/"$1"/chrome/userContent.css ~/.mozilla/firefox/"$1"/chrome/userContent.css.bak - fi - cd ~/.mozilla/firefox/"$1"/chrome/icons || exit - if [ -f ~/.mozilla/firefox/"$1"/chrome/icons/bug.svg ];then - for file in * - do - \mv -f "$file" "${file/.svg/.svg.bak}" - done - fi - cd "$wherewasi" || exit -} -function backupjs(){ - \mv -f ~/.mozilla/firefox/"$1"/user.js ~/.mozilla/firefox/"$1"/user.js.bak -} -function copyjs(){ - \cp -f user.js ~/.mozilla/firefox/"$1"/user.js -} -function doneinstall() -{ - echo "Installation finished." -} -function install_lepton(){ -if [ -f ~/.mozilla/firefox/"$1"/user.js ]; then - printf "user.js exists. Do you want to make a backup of it?(Y/n): " - read -r - case $REPLY in - [Nn]* ) printf "Overwriting...\n";copyjs "$1";; - * )printf "Making a backup...\n";backupjs "$1";copyjs "$1";; - esac -else - copyjs "$1" -fi -if [ -d "$HOME/.mozilla/firefox/$1/chrome" ]; then - printf "The directory chrome/ exists. Do you want to make a backup of it?(Y/n): " - read -r - case $REPLY in - [Nn]* ) printf "Overwriting...\n";copychrome "$1";doneinstall;; - * )printf "Making a backup...\n";backupchrome "$1";copychrome "$1";doneinstall;; - esac -else - mkdir ~/.mozilla/firefox/"$1"/chrome/ - copychrome "$1" - doneinstall -fi -} - -function multipleinstall(){ - echo "You have more than 1 profile for your install. What will you use? Pick a number." - grep "$1" ~/.mozilla/firefox/profiles.ini | grep 'Default=' | cut -f 2 -d'=' > .installs - cat --number .installs - read -r - profiledir="$(head -"${REPLY}" .installs | tail +"${REPLY}")" - install_lepton "$profiledir" - rm -rf .installs -} - -function install_option(){ - if [ "$(grep -c "$1" ~/.mozilla/firefox/.folders)" == "1" ]; then - profiledir="$(grep "$1" ~/.mozilla/firefox/profiles.ini | grep 'Default=' | cut -f 2 -d'=')" - install_lepton "$profiledir" - else - multipleinstall "$1" - fi - rm -rf ~/.mozilla/firefox/.folders -} -function askinstall(){ - printf "Will you install for ESR, Default, Dev, Nightly?(ESR/Default/Dev/Nightly): " - read -r - case $REPLY in - [Ee][Ss][Rr]) install_option .default-esr;; - [Dd][Ee][Ff][Aa][Uu][Ll][Tt]) install_option .default-release;; - [Dd][Ee][Vv]) install_option .dev-edition-default;; - [Nn][Ii][Gg][Hh][Tt][Ll][Yy]) install_option .default-nightly;; - *) echo "Unspecified.";exit;; - esac -} -wherewasi="$(pwd)" -cd ~/.mozilla/firefox/ || exit -find -maxdepth 1 | cut -f 2 -d"/" | sed -n '1!p' > .folders -cd "$wherewasi" || exit -if [ "$(grep -c "Default=" ~/.mozilla/firefox/installs.ini)" == "1" ]; then - #I have no idea how to sort this out. You fix it please. - if [ "$(grep -c ".dev-edition-default" ~/.mozilla/firefox/.folders)" == "1" ] || [ "$(grep -c ".dev-edition-default" ~/.mozilla/firefox/.folders)" -gt "1" ]; then - install_option .dev-edition-default - elif [ "$(grep -c ".default-release" ~/.mozilla/firefox/.folders)" == "1" ] || [ "$(grep -c ".default-release" ~/.mozilla/firefox/.folders)" -gt "1" ]; then - install_option .default-release - elif [ "$(grep -c ".default-nightly" ~/.mozilla/firefox/.folders)" == "1" ] || [ "$(grep -c ".default-nightly" ~/.mozilla/firefox/.folders)" -gt "1" ]; then - install_option .default-nightly - elif [ "$(grep -c ".default-esr" ~/.mozilla/firefox/.folders)" == "1" ] || [ "$(grep -c ".default-esr" ~/.mozilla/firefox/.folders)" == "1" ]; then - install_option .default-esr - else - echo "No Firefox profile found. Maybe you have never started FireFox. Please run at least 1 time to create a profile." - exit - fi -else - askinstall -fi From b0d9a8f27acc69efbc878fc5ab7f0322d71549e3 Mon Sep 17 00:00:00 2001 From: 7k5x <7k5xlp0onfire@gmail.com> Date: Mon, 14 Jun 2021 14:12:14 +0900 Subject: [PATCH 08/71] Add my email --- CREDITS | 1 + 1 file changed, 1 insertion(+) diff --git a/CREDITS b/CREDITS index 7ee9e72..b9a608b 100644 --- a/CREDITS +++ b/CREDITS @@ -66,6 +66,7 @@ W: https://github.com/medhefgo Contributors N: 7k5x +E: 7k5xlp0onfire@gmail.com W: https://github.com/7k5x N: Burak Yigit Kaya From ce61b7525fa5831c3ee5a93cd71891ba04412824 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 17 Jun 2021 10:24:38 +0900 Subject: [PATCH 09/71] Add: New Installer Refer @rafaelmardojai 's firefox-gnome-theme --- Install.sh | 19 --- install.sh | 431 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 431 insertions(+), 19 deletions(-) delete mode 100755 Install.sh create mode 100755 install.sh diff --git a/Install.sh b/Install.sh deleted file mode 100755 index e87dcfd..0000000 --- a/Install.sh +++ /dev/null @@ -1,19 +0,0 @@ -autocopy() { - local file=${1} - local target=${2} - - if [ -e "${target}" ]; then - echo "${target} alreay exist." - echo "Now Backup.." - autocopy "${target}" "${target}.bak" - echo"" - fi - - cp -v "${file}" "${target}" -} - -install_lepton() { - local userConfig="user.js" - autocopy "${userConfig}" "../${userConfig}" -} -install_lepton diff --git a/install.sh b/install.sh new file mode 100755 index 0000000..64f1219 --- /dev/null +++ b/install.sh @@ -0,0 +1,431 @@ +#!/usr/bin/env bash + +#** Helper Utils *************************************************************** +#== PATH / File ================================================================ +currentDir=$( cd "$(dirname $0)" ; pwd ) + +paths_filter() { + local pathListName="$1" # array name + local option="$2" + + # Set array + eval "local pathList=(\${${pathListName}[@]})" + + # Set default option + if [ -z "$option" ]; then + option="-e" + fi + + # Check path + local foundedTargets=() + for checkTarget in "${pathList[@]}"; do + if [ "$option" "$checkTarget" ]; then + foundedTargets+=("$checkTarget") + fi + done + + # Replace + eval "${pathListName}=(\${foundedTargets[@]})" +} + +autocopy() { + local file="${1}" + local target="${2}" + + if [ "${file}" == "${target}" ]; then + echo "'${file}' and ${target} are same file" + return 0 + fi + + if [ -e "${target}" ]; then + echo "${target} alreay exist." + echo "Now Backup.." + autocopy "${target}" "${target}.bak" + echo "" + fi + + cp -rv "${file}" "${target}" +} + +automv() { + local file="${1}" + local target="${2}" + + if [ "${file}" == "${target}" ]; then + echo "'${file}' and ${target} are same file" + return 0 + fi + + if [ -e "${target}" ]; then + echo "${target} alreay exist." + echo "Now Backup.." + automv "${target}" "${target}.bak" + echo "" + fi + + mv -v "${file}" "${target}" +} + +autorestore() { + local file="${1}" + local target="${file}.bak" + + if [ -e "${file}" ]; then + rm -rv "${file}" + fi + mv -v "${target}" "${file}" + + local lookupTarget="${target}.bak" + if [ -e "${lookupTarget}" ]; then + autorestore "${target}" + fi +} + +#== Message ==================================================================== +lepton_error_message() { + >&2 echo "FAILED: ${@}" + exit 1 +} + +lepton_ok_message() { + local SIZE=50 + local FILLED="" + for ((i=0; i<=$(("${SIZE}" - 2)); i++)); do + FILLED+="." + done + FILLED+="OK" + + local message="${@}" + echo "${message}${FILLED:${#message}}" +} + +#== Multiselct ================================================================= +# https://stackoverflow.com/questions/45382472/bash-select-multiple-answers-at-once/54261882 +multiselect() { + echo 'Select with , Done with !!!' + + # little helpers for terminal print control and key input + ESC=$( printf "\033") + cursor_blink_on() { printf "$ESC[?25h"; } + cursor_blink_off() { printf "$ESC[?25l"; } + cursor_to() { printf "$ESC[$1;${2:-1}H"; } + print_inactive() { printf "$2 $1 "; } + print_active() { printf "$2 $ESC[7m $1 $ESC[27m"; } + get_cursor_row() { IFS=';' read -sdR -p $'\E[6n' ROW COL; echo ${ROW#*[}; } + key_input() { + local key + IFS= read -rsn1 key 2>/dev/null >&2 + if [[ $key = "" ]]; then echo enter; fi; + if [[ $key = $'\x20' ]]; then echo space; fi; + if [[ $key = $'\x1b' ]]; then + read -rsn2 key + if [[ $key = [A ]]; then echo up; fi; + if [[ $key = [B ]]; then echo down; fi; + fi + } + toggle_option() { + local arr_name=$1 + eval "local arr=(\"\${${arr_name}[@]}\")" + local option=$2 + if [[ ${arr[option]} == true ]]; then + arr[option]= + else + arr[option]=true + fi + eval $arr_name='("${arr[@]}")' + } + + local retval=$1 + local options + local defaults + + IFS=';' read -r -a options <<< "$2" + if [[ -z $3 ]]; then + defaults=() + else + IFS=';' read -r -a defaults <<< "$3" + fi + local selected=() + + for ((i=0; i<${#options[@]}; i++)); do + selected+=("${defaults[i]}") + printf "\n" + done + + # determine current screen position for overwriting the options + local lastrow=`get_cursor_row` + local startrow=$(($lastrow - ${#options[@]})) + + # ensure cursor and input echoing back on upon a ctrl+c during read -s + trap "cursor_blink_on; stty echo; printf '\n'; exit" 2 + cursor_blink_off + + local active=0 + while true; do + # print options by overwriting the last lines + local idx=0 + for option in "${options[@]}"; do + local prefix="[ ]" + if [[ ${selected[idx]} == true ]]; then + prefix="[x]" + fi + + cursor_to $(($startrow + $idx)) + if [ $idx -eq $active ]; then + print_active "$option" "$prefix" + else + print_inactive "$option" "$prefix" + fi + ((idx++)) + done + + # user key control + case `key_input` in + space) toggle_option selected $active;; + enter) break;; + up) ((active--)); + if [ $active -lt 0 ]; then active=$((${#options[@]} - 1)); fi;; + down) ((active++)); + if [ $active -ge ${#options[@]} ]; then active=0; fi;; + esac + done + + # cursor position back to normal + cursor_to $lastrow + printf "\n" + cursor_blink_on + + eval $retval='("${selected[@]}")' +} + +#** Profile ******************************************************************** +#== Profile Dir ================================================================ +firefoxProfileDirPaths=( + ~/.mozilla/firefox + ~/.var/app/org.mozilla.firefox/.mozilla/firefox +) + +check_profile_dir() { + local profileDir="$1" + if [ "${profileDir}" != "" ]; then + firefoxProfileDirPaths=("${profileDir}") + fi + + paths_filter firefoxProfileDirPaths -d + + local foundCount="${#firefoxProfileDirPaths[@]}" + if [ "${foundCount}" -eq 0 ]; then + lepton_error_message "Unable to find firefox profile dir." + fi + + lepton_ok_message "Profiles dir found" +} + +#== Profile Info =============================================================== +PROFILEINFOFILE="profiles.ini" +check_profile_ini() { + local infoFile="profiles.ini" + + for profileDir in "${firefoxProfileDirPaths[@]}"; do + if [ ! -f "${profileDir}/${PROFILEINFOFILE}" ]; then + lepton_error_message "Unable to find ${PROFILEINFOFILE} at ${profileDir}" + fi + done + + lepton_ok_message "Profiles info file found" +} + +#== Profile PATH =============================================================== +firefoxProfilePaths=() +select_profile() { + local profileName="$1" + + for profileDir in "${firefoxProfileDirPaths[@]}"; do + local escapeDir=$(echo "${profileDir}" | sed "s|\/|\\\/|g") + firefoxProfilePaths+=($( + grep -E "^Path" "${profileDir}/${PROFILEINFOFILE}" | + cut -f 2 -d"=" | + sed "s/^/${escapeDir}\//" + )) + done + + if [ "${profileName}" != "" ]; then + local targetPath="" + for profilePath in "${firefoxProfilePaths[@]}"; do + if [ profilePath == *"${profileName}"* ]; then + targetPath="${profilePath}" + break + fi + done + + if [ "${targetPath}" == "" ]; then + lepton_ok_message "Profile, \"${profileName}\" found" + firefoxProfilePaths=("${targetPath}") + else + lepton_error_message "Unable to find ${profileName}" + fi + else + local foundCount="${#firefoxProfilePaths[@]}" + if [ "${foundCount}" -eq 1 ]; then + lepton_ok_message "Auto detected profile" + else + local targetPaths=() + local multiPaths=$(echo "${firefoxProfilePaths[@]}" | sed 's/ /;/g') + multiselect profileSelected "${multiPaths}" + for ((i=0; i<"${#profileSelected[@]}"; i++)); do + local result="${profileSelected[${i}]}" + if [ "$result" == "true" ]; then + targetPaths+=("${firefoxProfilePaths[${i}]}") + fi + done + + firefoxProfilePaths=("${targetPaths[@]}") + lepton_ok_message "Multi selected profiles" + fi + fi +} + +#** Install ******************************************************************** +#== Install Types ============================================================== +leptonBranch="master" +select_distribution() { + select distribution in "Original(default)" "Photon-Style"; do + case "${distribution}" in + "Original") leptonBranch="master" ;; + "Photon-Style") leptonBranch="photon-style" ;; + esac + lepton_ok_message "Selected ${distribution}" + break + done +} + +leptonInstallType="Network" # Other types: Local, Release +check_install_type() { + local targetListName="${1}" + local installType="${2}" + + eval "local targetCount=\${#${targetListName}[@]}" + paths_filter "${targetListName}" + eval "local foundCount=\${#${targetListName}[@]}" + + if [ "${targetCount}" -eq "${foundCount}" ]; then + leptonInstallType="${installType}" + fi +} + +checkLocalFiles=( + userChrome.css + userContent.css + icons +) +checkReleaseFiles=( + user.js + chrome/userChrome.css + chrome/userContent.css + chrome/icons +) +check_install_types() { + check_install_type checkLocalFiles "Local" + check_install_type checkReleaseFiles "Release" + + lepton_ok_message "Checked install type: ${leptonInstallType}" + if [ "${leptonInstallType}" == "Network" ]; then + select_distribution + fi + if [ "${leptonInstallType}" == "Local" ]; then + if [ -d ".git" ]; then + select_distribution + git checkout "${leptonBranch}" + fi + fi +} + +#== Each Install =============================================================== +install_local() { + for profilePath in "${firefoxProfilePaths}"; do + autocopy user.js "${profilePath}/user.js" + autocopy "${currentDir}" "${profilePath}/chrome" + done + lepton_ok_message "End profile copy" +} + +install_release() { + for profilePath in "${firefoxProfilePaths}"; do + autocopy user.js "${profilePath}/user.js" + autocopy chrome "${profilePath}/chrome" + done + lepton_ok_message "End profile copy" +} + +install_network() { + local duplicate="" + if [ -e "chrome" ]; then + duplicate="true" + automv chrome chrome.bak + fi + + local isProfile="" + git clone -b "${}" https://github.com/black7375/Firefox-UI-Fix.git chrome + for profilePath in "${firefoxProfilePaths}"; do + autocopy chrome/user.js "${profilePath}/user.js" + autocopy chrome "${profilePath}/chrome" + + if [ "${currentDir}" == "${profilePath}" ]; then + isProfile="true" + fi + done + lepton_ok_message "End profile copy" + + cd "${currentDir}" + if [ ! "${duplicate}" == "true" ]; then + rm -rv chrome + fi + if [ "${duplicate}" == "true" ]; then + autorestore chrome + fi + lepton_ok_message "End clean files" +} + +firefoxProfilePaths=() +install_profile() { + lepton_ok_message "Started install" + + case "${leptonInstallType}" in + "Local") install_local ;; + "Release") install_release ;; + "Network") install_network ;; + esac + + lepton_ok_message "End install" +} + +#** Main *********************************************************************** +install_lepton() { + local profileDir="" + local profileName="" + + # Get options. + while getopts 'f:p:g:t:h' flag; do + case "${flag}" in + f) profileDir="${OPTARG}" ;; + p) profileName="${OPTARG}" ;; + h) + echo "Lepton Theme Install Script:" + echo " -f . Set custom Firefox folder path." + echo " -p . Set custom profile name." + echo " -h to show this message." + exit 0 + ;; + esac + done + + check_install_types + + check_profile_dir "${profileDir}" + check_profile_ini + select_profile "${profileName}" + + install_profile +} + +install_lepton "$@" From 2842b274a8a520db8cb8995d1d3f9f4d6e472a20 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 17 Jun 2021 11:10:35 +0900 Subject: [PATCH 10/71] Fix: Installer - profile name option --- install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 64f1219..cbe85cb 100755 --- a/install.sh +++ b/install.sh @@ -252,13 +252,13 @@ select_profile() { if [ "${profileName}" != "" ]; then local targetPath="" for profilePath in "${firefoxProfilePaths[@]}"; do - if [ profilePath == *"${profileName}"* ]; then + if [[ "${profilePath}" == *"${profileName}" ]]; then targetPath="${profilePath}" break fi done - if [ "${targetPath}" == "" ]; then + if [ "${targetPath}" != "" ]; then lepton_ok_message "Profile, \"${profileName}\" found" firefoxProfilePaths=("${targetPath}") else @@ -386,7 +386,6 @@ install_network() { lepton_ok_message "End clean files" } -firefoxProfilePaths=() install_profile() { lepton_ok_message "Started install" From 3843b68ca045b1ebc918d0794d2cfa1e974e85ff Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 17 Jun 2021 11:15:33 +0900 Subject: [PATCH 11/71] Fix: Installer - None selected profile --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index cbe85cb..c185bd5 100755 --- a/install.sh +++ b/install.sh @@ -280,7 +280,12 @@ select_profile() { done firefoxProfilePaths=("${targetPaths[@]}") - lepton_ok_message "Multi selected profiles" + foundCount="${#firefoxProfilePaths[@]}" + if [ "${foundCount}" -eq 0 ]; then + lepton_error_message "Please select profiles" + else + lepton_ok_message "Multi selected profiles" + fi fi fi } From 49544a67c5e9ba1528b3e1dcc34f049025b2e417 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 17 Jun 2021 11:22:20 +0900 Subject: [PATCH 12/71] Fix: Installer - Network Install --- install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index c185bd5..8e8ca4e 100755 --- a/install.sh +++ b/install.sh @@ -369,8 +369,9 @@ install_network() { automv chrome chrome.bak fi + git clone -b "${leptonBranch}" https://github.com/black7375/Firefox-UI-Fix.git chrome + local isProfile="" - git clone -b "${}" https://github.com/black7375/Firefox-UI-Fix.git chrome for profilePath in "${firefoxProfilePaths}"; do autocopy chrome/user.js "${profilePath}/user.js" autocopy chrome "${profilePath}/chrome" From a0f2b2ca6430b8eaf0c338e872116cd3f6021317 Mon Sep 17 00:00:00 2001 From: MS_Y Date: Fri, 18 Jun 2021 00:26:26 +0000 Subject: [PATCH 13/71] Doc: Issue Template - Update label, Add Distribution --- .github/ISSUE_TEMPLATE/bug_report.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index bb80eae..9a6637a 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -2,7 +2,7 @@ name: Bug report about: Create a report to help us improve title: '' -labels: bug +labels: Issue::Bug assignees: '' --- @@ -17,6 +17,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Environment (please complete the following information):** +Check like `- [x]`. + - Distribution + - [ ] [Original Lepton](https://github.com/black7375/Firefox-UI-Fix) + - [ ] [Lepton's photon style](https://github.com/black7375/Firefox-UI-Fix/tree/photon-style) - Firefox Version: [write from `about:support` - `version`] - OS: - [ ] Linux From 01cadc442532560be1deda2f1c384084bcd1b450 Mon Sep 17 00:00:00 2001 From: MS_Y Date: Sat, 19 Jun 2021 10:21:47 +0000 Subject: [PATCH 14/71] Fix: install.sh path at relaese --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ce5e692..0f0c3a3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,9 +23,9 @@ jobs: mkdir -v chrome shopt -s extglob - mv -v !(chrome|user.js) chrome/ + mv -v !(chrome|user.js|install.sh) chrome/ - zip -rv ${{ matrix.name }}.zip chrome user.js + zip -rv ${{ matrix.name }}.zip chrome user.js install.sh - uses: softprops/action-gh-release@v1 # actions/create-release, actions/upload-release-asset is deprecated if: startsWith(github.ref, 'refs/tags/') From fa830457151840c164b62a1c5cc1f007406e4383 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Sun, 20 Jun 2021 03:57:41 +0000 Subject: [PATCH 15/71] Opacity/Avatar-Padding Make icons ghosted when the menuitem is disabled, and fix the avatar padding (it looks better with arrowpanel-menuicon-padding). --- userChrome.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/userChrome.css b/userChrome.css index 54da386..cf58b6f 100644 --- a/userChrome.css +++ b/userChrome.css @@ -568,6 +568,9 @@ } /** Panel - Icons ***********************************************************/ + + .subviewbutton[disabled=true] > image { opacity: 0.4; } /* Ghost icons when disabled */ + /* Padding */ :root { --arrowpanel-menublank-padding: calc(var(--arrowpanel-menuicon-padding) * 2 + 8px) !important; @@ -706,7 +709,7 @@ /* Default */ #fxa-menu-avatar { display: -moz-inline-box !important; - margin-inline-end: var(--arrowpanel-menuitem-padding); + margin-inline-end: var(--arrowpanel-menuicon-padding); } .syncNowBtn { From 1b4eb64a5fed7281060ad498fba66cc8738eb54c Mon Sep 17 00:00:00 2001 From: MS_Y Date: Sun, 20 Jun 2021 08:32:57 +0000 Subject: [PATCH 16/71] Fix: Darkmode detect compatibility --- userChrome.css | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/userChrome.css b/userChrome.css index cf58b6f..0928d82 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1,7 +1,6 @@ @media (-moz-proton) { /** Darkmode - Color lighter ************************************************/ - :root[style*="--lwt-accent-color:rgb(12, 12, 13); --lwt-text-color:rgba(249, 249, 250);"], - :root[style*="--lwt-accent-color:rgb(28, 27, 34); --lwt-text-color:rgba(251, 251, 254);"] { + :root[lwtheme-mozlightdark][lwthemetextcolor="bright"] { --toolbar-bgcolor: rgba(43, 42, 51, 5) !important; /* Original: rgba(43, 42, 51, 1) */ } From 2ea158d405c768bca93af3291a15817c58852253 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sun, 20 Jun 2021 22:17:49 +0900 Subject: [PATCH 17/71] Add: icons from @23Bluemaster23 's EdgeFox --- icons/image.svg | 9 +++++++++ icons/loop.svg | 3 +++ icons/paste.svg | 9 +++++++++ icons/play.svg | 3 +++ icons/select-all.svg | 3 +++ icons/video-clip.svg | 3 +++ icons/video-snapshot.svg | 3 +++ 7 files changed, 33 insertions(+) create mode 100644 icons/image.svg create mode 100644 icons/loop.svg create mode 100644 icons/paste.svg create mode 100644 icons/play.svg create mode 100644 icons/select-all.svg create mode 100644 icons/video-clip.svg create mode 100644 icons/video-snapshot.svg diff --git a/icons/image.svg b/icons/image.svg new file mode 100644 index 0000000..863c9d7 --- /dev/null +++ b/icons/image.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/icons/loop.svg b/icons/loop.svg new file mode 100644 index 0000000..04d35f3 --- /dev/null +++ b/icons/loop.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/paste.svg b/icons/paste.svg new file mode 100644 index 0000000..339916a --- /dev/null +++ b/icons/paste.svg @@ -0,0 +1,9 @@ + + + + + + + diff --git a/icons/play.svg b/icons/play.svg new file mode 100644 index 0000000..756dcc2 --- /dev/null +++ b/icons/play.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/select-all.svg b/icons/select-all.svg new file mode 100644 index 0000000..0d56800 --- /dev/null +++ b/icons/select-all.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/video-clip.svg b/icons/video-clip.svg new file mode 100644 index 0000000..8be8616 --- /dev/null +++ b/icons/video-clip.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/video-snapshot.svg b/icons/video-snapshot.svg new file mode 100644 index 0000000..be15181 --- /dev/null +++ b/icons/video-snapshot.svg @@ -0,0 +1,3 @@ + + + From 0148a9ada43aafbf7c37154235d9c89bcd9de301 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 21 Jun 2021 10:06:15 +0900 Subject: [PATCH 18/71] Clean: Context Menu - using var --- userChrome.css | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/userChrome.css b/userChrome.css index 4aa04af..84e54a0 100644 --- a/userChrome.css +++ b/userChrome.css @@ -524,9 +524,17 @@ } /** Menu - Reduce Padding ***************************************************/ - :root:not([uidensity=touch]) menupopup > menuitem, menupopup > menu { - padding-block: 0.35em !important; /* Original: 0.5em */ + :root:not([uidensity=touch]) { + --menu-padding: 0.35em; } + :root[uidensity=compact] { + --menu-padding: 0.25em; + } + menupopup > menuitem, menupopup > menu { + /* Original: 0.5em */ + padding-block: var(--menu-padding, 0.5em) !important; + } + :root:not([uidensity=touch]) .menu-text, .menu-iconic-text { padding-inline-end: 0 !important; /* Original: 2px */ } @@ -540,10 +548,6 @@ margin-right: 6px !important; /* Original: 12px */ } - :root[uidensity=compact] menupopup > menuitem, menupopup > menu { - padding-block: 0.25em !important; /* Original: 0.5em */ - } - /** Panel - Icons ***********************************************************/ /*= Padding ================================================================*/ :root { From bfe84cc3e587186931465c11b67466aff48dc062 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 21 Jun 2021 11:28:54 +0900 Subject: [PATCH 19/71] Add: icons from @microsoft 's fluentui-system-icons --- icons/arrow-swap.svg | 4 ++++ icons/tab-copy.svg | 4 ++++ icons/tab-multiple.svg | 4 ++++ 3 files changed, 12 insertions(+) create mode 100644 icons/arrow-swap.svg create mode 100644 icons/tab-copy.svg create mode 100644 icons/tab-multiple.svg diff --git a/icons/arrow-swap.svg b/icons/arrow-swap.svg new file mode 100644 index 0000000..a6f0106 --- /dev/null +++ b/icons/arrow-swap.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/tab-copy.svg b/icons/tab-copy.svg new file mode 100644 index 0000000..6b23f47 --- /dev/null +++ b/icons/tab-copy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/tab-multiple.svg b/icons/tab-multiple.svg new file mode 100644 index 0000000..3b6fc86 --- /dev/null +++ b/icons/tab-multiple.svg @@ -0,0 +1,4 @@ + + + + From 8a6407ea992ebe088fa6aeb9ef3c73db2fc1b2c0 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 21 Jun 2021 11:54:23 +0900 Subject: [PATCH 20/71] Fix: Context Menu - Tab context icons update --- icons/arrow-swap.svg | 6 +++--- icons/tab-copy.svg | 6 +++--- icons/tab-multiple.svg | 6 +++--- userChrome.css | 4 ++++ 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/icons/arrow-swap.svg b/icons/arrow-swap.svg index a6f0106..3e9cd87 100644 --- a/icons/arrow-swap.svg +++ b/icons/arrow-swap.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/icons/tab-copy.svg b/icons/tab-copy.svg index 6b23f47..427332b 100644 --- a/icons/tab-copy.svg +++ b/icons/tab-copy.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/icons/tab-multiple.svg b/icons/tab-multiple.svg index 3b6fc86..f77d817 100644 --- a/icons/tab-multiple.svg +++ b/icons/tab-multiple.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/userChrome.css b/userChrome.css index 84e54a0..37a653c 100644 --- a/userChrome.css +++ b/userChrome.css @@ -913,6 +913,7 @@ } #context_duplicateTab, #context_duplicateTabs { + background-image: url(./icons/tab-copy.svg); } #context_bookmarkTab, @@ -920,6 +921,7 @@ background-image: url(chrome://browser/skin/bookmark.svg); } #context_moveTabOptions { + background-image: url(./icons/arrow-swap.svg); } #context_sendTabToDevice { background-image: url(chrome://browser/skin/send-to-device.svg); @@ -928,6 +930,7 @@ background-image: url(./icons/container-openin-16.svg); } #context_selectAllTabs { + background-image: url(./icons/tab-multiple.svg); } #context_closeTab { @@ -976,6 +979,7 @@ background-image: url(chrome://browser/skin/bookmark.svg); } #toolbar-context-selectAllTabs { + background-image: url(./icons/tab-multiple.svg); } #toolbar-context-undoCloseTab { background-image: url(chrome://global/skin/icons/undo.svg); From 930cb763aed722f02eadb64b631c6d915c5367ac Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 21 Jun 2021 12:10:40 +0900 Subject: [PATCH 21/71] Add: Context Menu - Icons layout --- userChrome.css | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/userChrome.css b/userChrome.css index 37a653c..41f5849 100644 --- a/userChrome.css +++ b/userChrome.css @@ -886,6 +886,47 @@ } /** Context Menu - Icons ****************************************************/ + /*= Layout =================================================================*/ + menupopup menuitem, + menupopup menu { + -moz-appearance: none !important; /* Linux: menulist */ + } + + /* Icon */ + :not(menu, #ContentSelectDropdown) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), + :not(menu, #ContentSelectDropdown) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), + #blockedPopupDontShowMessage { + -moz-context-properties: fill, fill-opacity !important; + fill: currentColor !important; + background-size: 16px !important; + background-repeat: no-repeat !important; + } + + /* Layout */ + :root { + --context-menu-background-padding-default: 5px; + --context-menu-background-padding: var(--context-menu-background-padding-default); + } + :not(menu, #ContentSelectDropdown) > menupopup > menuitem, + :not(menu, #ContentSelectDropdown) > menupopup > menu, + #blockedPopupDontShowMessage { + background-position: left var(--context-menu-background-padding) center !important; + padding-inline-start: var(--context-menu-background-padding) !important; + } + + @media (-moz-os-version: windows-win7 ), + (-moz-os-version: windows-win8 ), + (-moz-os-version: windows-win10) { + :not(menu, #ContentSelectDropdown) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), + :not(menu, #ContentSelectDropdown) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), + :root { + --context-menu-background-padding: 1em; + } + #blockedPopupDontShowMessage { + padding-inline-start: calc(var(--context-menu-background-padding) + var(--menu-padding) + var(--context-menu-background-padding-default) + 16px) !important; + } + } + /*= tabContextMenu =========================================================*/ #context_openANewTab { background-image: url(chrome://browser/skin/new-tab.svg) !important; From 904485b99eb66dcc88443a781a8b87c9cc364d93 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 21 Jun 2021 23:19:12 +0900 Subject: [PATCH 22/71] Clean: Panel - Icons --- userChrome.css | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/userChrome.css b/userChrome.css index 0928d82..213630f 100644 --- a/userChrome.css +++ b/userChrome.css @@ -567,9 +567,6 @@ } /** Panel - Icons ***********************************************************/ - - .subviewbutton[disabled=true] > image { opacity: 0.4; } /* Ghost icons when disabled */ - /* Padding */ :root { --arrowpanel-menublank-padding: calc(var(--arrowpanel-menuicon-padding) * 2 + 8px) !important; @@ -621,6 +618,11 @@ -moz-context-properties: fill !important; } + .subviewbutton[disabled=true] > image { + /* Ghost icons when disabled */ + opacity: 0.4; + } + /* Panel - Main */ #appMenu-proton-addon-banners > .addon-banner-item > .toolbarbutton-icon { display: -moz-inline-box !important; From b35dd8c7bb2b71bfffea36fa8b889df6b0d54664 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 10:13:51 +0900 Subject: [PATCH 23/71] Add: icons from @microsoft 's fluentui-system-icons --- icons/{loop.svg => arrow-repeat-all.svg} | 0 icons/arrow-sort-down-lines.svg | 3 +++ icons/book-add.svg | 3 +++ icons/book.svg | 4 ++++ icons/calendar-agenda.svg | 3 +++ icons/code.svg | 3 +++ icons/{select-all.svg => copy-select.svg} | 0 icons/document_landscape_split_hint.svg | 8 ++++++++ icons/eye-hide.svg | 5 +++++ icons/eye-show.svg | 4 ++++ icons/image-add.svg | 3 +++ icons/image-alt-text.svg | 5 +++++ icons/image-arrow-counterclockwise.svg | 5 +++++ icons/key-multiple.svg | 3 +++ icons/link-square.svg | 4 ++++ icons/password.svg | 6 ++++++ icons/resize-image.svg | 3 +++ icons/select-all-on.svg | 3 +++ icons/text-direction-horizontal-ltr.svg | 3 +++ icons/text-number-format.svg | 3 +++ icons/text-proofing-tools.svg | 6 ++++++ icons/time-picker.svg | 3 +++ icons/video.svg | 3 +++ 23 files changed, 83 insertions(+) rename icons/{loop.svg => arrow-repeat-all.svg} (100%) create mode 100644 icons/arrow-sort-down-lines.svg create mode 100644 icons/book-add.svg create mode 100644 icons/book.svg create mode 100644 icons/calendar-agenda.svg create mode 100644 icons/code.svg rename icons/{select-all.svg => copy-select.svg} (100%) create mode 100644 icons/document_landscape_split_hint.svg create mode 100644 icons/eye-hide.svg create mode 100644 icons/eye-show.svg create mode 100644 icons/image-add.svg create mode 100644 icons/image-alt-text.svg create mode 100644 icons/image-arrow-counterclockwise.svg create mode 100644 icons/key-multiple.svg create mode 100644 icons/link-square.svg create mode 100644 icons/password.svg create mode 100644 icons/resize-image.svg create mode 100644 icons/select-all-on.svg create mode 100644 icons/text-direction-horizontal-ltr.svg create mode 100644 icons/text-number-format.svg create mode 100644 icons/text-proofing-tools.svg create mode 100644 icons/time-picker.svg create mode 100644 icons/video.svg diff --git a/icons/loop.svg b/icons/arrow-repeat-all.svg similarity index 100% rename from icons/loop.svg rename to icons/arrow-repeat-all.svg diff --git a/icons/arrow-sort-down-lines.svg b/icons/arrow-sort-down-lines.svg new file mode 100644 index 0000000..068440c --- /dev/null +++ b/icons/arrow-sort-down-lines.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/book-add.svg b/icons/book-add.svg new file mode 100644 index 0000000..f7482a6 --- /dev/null +++ b/icons/book-add.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/book.svg b/icons/book.svg new file mode 100644 index 0000000..8627f13 --- /dev/null +++ b/icons/book.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/calendar-agenda.svg b/icons/calendar-agenda.svg new file mode 100644 index 0000000..c89b9b8 --- /dev/null +++ b/icons/calendar-agenda.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/code.svg b/icons/code.svg new file mode 100644 index 0000000..1885f67 --- /dev/null +++ b/icons/code.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/select-all.svg b/icons/copy-select.svg similarity index 100% rename from icons/select-all.svg rename to icons/copy-select.svg diff --git a/icons/document_landscape_split_hint.svg b/icons/document_landscape_split_hint.svg new file mode 100644 index 0000000..ece0c98 --- /dev/null +++ b/icons/document_landscape_split_hint.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/icons/eye-hide.svg b/icons/eye-hide.svg new file mode 100644 index 0000000..37324bb --- /dev/null +++ b/icons/eye-hide.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icons/eye-show.svg b/icons/eye-show.svg new file mode 100644 index 0000000..fefcf0d --- /dev/null +++ b/icons/eye-show.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/image-add.svg b/icons/image-add.svg new file mode 100644 index 0000000..59bfb90 --- /dev/null +++ b/icons/image-add.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/image-alt-text.svg b/icons/image-alt-text.svg new file mode 100644 index 0000000..1a77a4b --- /dev/null +++ b/icons/image-alt-text.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icons/image-arrow-counterclockwise.svg b/icons/image-arrow-counterclockwise.svg new file mode 100644 index 0000000..5edf628 --- /dev/null +++ b/icons/image-arrow-counterclockwise.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/icons/key-multiple.svg b/icons/key-multiple.svg new file mode 100644 index 0000000..c04c3e9 --- /dev/null +++ b/icons/key-multiple.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/link-square.svg b/icons/link-square.svg new file mode 100644 index 0000000..4aa865b --- /dev/null +++ b/icons/link-square.svg @@ -0,0 +1,4 @@ + + + + diff --git a/icons/password.svg b/icons/password.svg new file mode 100644 index 0000000..22c034a --- /dev/null +++ b/icons/password.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icons/resize-image.svg b/icons/resize-image.svg new file mode 100644 index 0000000..a17ce95 --- /dev/null +++ b/icons/resize-image.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/select-all-on.svg b/icons/select-all-on.svg new file mode 100644 index 0000000..3b15ebd --- /dev/null +++ b/icons/select-all-on.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/text-direction-horizontal-ltr.svg b/icons/text-direction-horizontal-ltr.svg new file mode 100644 index 0000000..de52f53 --- /dev/null +++ b/icons/text-direction-horizontal-ltr.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/text-number-format.svg b/icons/text-number-format.svg new file mode 100644 index 0000000..ee14184 --- /dev/null +++ b/icons/text-number-format.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/text-proofing-tools.svg b/icons/text-proofing-tools.svg new file mode 100644 index 0000000..29d5671 --- /dev/null +++ b/icons/text-proofing-tools.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/icons/time-picker.svg b/icons/time-picker.svg new file mode 100644 index 0000000..131a8ed --- /dev/null +++ b/icons/time-picker.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/video.svg b/icons/video.svg new file mode 100644 index 0000000..8ea9798 --- /dev/null +++ b/icons/video.svg @@ -0,0 +1,3 @@ + + + From dab9aa5a18ddf85ec331ae9ae028be31da2e3372 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 10:14:36 +0900 Subject: [PATCH 24/71] Fix: Context Menu - toolbar-context-menu icons --- userChrome.css | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/userChrome.css b/userChrome.css index 41f5849..f63090a 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1003,6 +1003,7 @@ background-image: url(chrome://browser/skin/pin-12.svg); } .toolbar-context-autohide-downloads-button { + background-image: url(./icons/password-hide.svg); } .customize-context-removeFromToolbar { background-image: url(chrome://global/skin/icons/delete.svg); @@ -1026,7 +1027,14 @@ background-image: url(chrome://global/skin/icons/undo.svg); } - #viewCustomizeToolbar { + #toggle_toolbar-menubar { + background-image: url(./icons/calendar-agenda.svg); + } + #toggle_PersonalToolbar { + background-image: url(chrome://browser/skin/bookmarks-toolbar.svg); + } + + menuitem.viewCustomizeToolbar { background-image: url(chrome://browser/skin/customize.svg); } From 1a5b33db134103c81b631774fe9f27f7e1baeab6 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 10:15:36 +0900 Subject: [PATCH 25/71] Add: Context Menu - content area menu icons --- ....svg => document-landscape-split-hint.svg} | 0 userChrome.css | 234 ++++++++++++++++++ 2 files changed, 234 insertions(+) rename icons/{document_landscape_split_hint.svg => document-landscape-split-hint.svg} (100%) diff --git a/icons/document_landscape_split_hint.svg b/icons/document-landscape-split-hint.svg similarity index 100% rename from icons/document_landscape_split_hint.svg rename to icons/document-landscape-split-hint.svg diff --git a/userChrome.css b/userChrome.css index f63090a..b19b49c 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1056,4 +1056,238 @@ #autohide-context > menuitem[data-l10n-id="full-screen-exit"] { background-image: url(chrome://browser/skin/fullscreen-exit.svg); } + + /*= contentAreaContextMenu =================================================*/ + #context-viewsource-goToLine { + background-image: url(./icons/text-number-format.svg); + } + #context-viewsource-wrapLongLines { /* checkbox */ + /* background-image: url(./icons/arrow-sort-down-lines.svg); */ + } + + #context-viewsource-highlightSyntax { /* checkbox */ + /* background-image: url(./icons/code.svg); */ + } + + #spell-no-suggestions { + background-image: url(./icons/text-proofing-tools.svg); + } + #spell-add-to-dictionary { + background-image: url(./icons/book-add.svg); + } + #spell-undo-add-to-dictionary { + background-image: url(chrome://global/skin/icons/undo.svg); + } + + #context-openlinkincurrent { + background-image: url(./icons/link-square.svg); + } + #context-openlinkincontainertab { + background-image: url(chrome://browser/skin/new-tab.svg); + } + #context-openlinkintab { + background-image: url(chrome://browser/skin/new-tab.svg); + } + #context-openlinkinusercontext-menu { + background-image: url(./icons/container-openin-16.svg); + } + #context-openlink { + background-image: url(chrome://browser/skin/window.svg); + } + #context-openlinkprivate { + background-image: url(chrome://browser/skin/privateBrowsing.svg); + } + + #context-bookmarklink { + background-image: url(chrome://browser/skin/bookmark.svg); + } + #context-savelink { + background-image: url(chrome://browser/skin/save.svg); + } + #context-savelinktopocket { + background-image: url(chrome://browser/skin/pocket-outline.svg); + } + #context-copyemail { + background-image: url(chrome://browser/skin/mail.svg); + } + #context-copylink { + background-image: url(chrome://browser/skin/link.svg); + } + #context-sendlinktodevice { + background-image: url(chrome://browser/skin/send-to-device.svg); + } + + #context-media-play { + background-image: url(chrome://global/skin/media/play-fill.svg); + } + #context-media-pause { + background-image: url(chrome://global/skin/media/pause-fill.svg); + } + #context-media-mute { + background-image: url(chrome://global/skin/media/audio-muted.svg); + } + #context-media-unmute { + background-image: url(chrome://global/skin/media/audio.svg); + } + #context-media-playbackrate { + background-image: url(./icons/time-picker.svg); + } + #context-media-loop { + background-image: url(./icons/arrow-repeat-all.svg); + } + #context-leave-dom-fullscreen { + background-image: url(chrome://global/skin/media/fullscreenExitButton.svg); + } + #context-video-fullscreen { + background-image: url(chrome://global/skin/media/fullscreenEnterButton.svg); + } + #context-media-hidecontrols { + background-image: url(./icons/eye-hide.svg); + } + #context-media-showcontrols { + background-image: url(./icons/eye-show.svg); + } + + #context-viewvideo { + background-image: url(./icons/video.svg); + } + #context-video-pictureinpicture { + background-image: url(chrome://global/skin/media/picture-in-picture-open.svg); + } + + #context-reloadimage { + background-image: url(./icons/image-arrow-counterclockwise.svg); + } + #context-viewimage { + background-image: url(./icons/image-add.svg); + } + #context-saveimage { + background-image: url(./icons/image.svg); + } + #context-video-saveimage { + background-image: url(./icons/video-snapshot.svg); + } + #context-savevideo { + background-image: url(./icons/video.svg); + } + #context-saveaudio { + background-image: url(chrome://global/skin/media/audio.svg); + } + #context-copyimage-contents { + } + #context-copyimage, + #context-copyvideourl, + #context-copyaudiourl { + background-image: url(chrome://browser/skin/link.svg); + } + #context-sendimage, + #context-sendvideo, + #context-sendaudio { + background-image: url(chrome://browser/skin/mail.svg); + } + #context-viewimageinfo { + background-image: url(chrome://global/skin/icons/info.svg); + } + #context-viewimagedesc { + background-image: url(./icons/image-alt-text); + } + #context-setDesktopBackground { + background-image: url(./icons/resize-image.svg); + } + #context-ctp-play { + background-image: url(chrome://global/skin/icons/plugin.svg); + } + #context-ctp-hide { + background-image: url(chrome://global/skin/icons/plugin-blocked.svg); + } + + #context-savepage { + background-image: url(chrome://browser/skin/save.svg); + } + #context-pocket { + background-image: url(chrome://browser/skin/pocket-outline.svg); + } + #context-sendpagetodevice { + background-image: url(chrome://browser/skin/send-to-device.svg); + } + #fill-login { + background-image: url(./icons/password.svg); + } + #fill-login-generated-password { + background-image: url(chrome://browser/skin/login.svg); + } + #manage-saved-logins { + background-image: url(./icons/key-multiple.svg); + } + + #context-undo { + background-image: url(chrome://global/skin/icons/undo.svg); + } + #context-redo { + } + + #context-cut { + background-image: url(chrome://browser/skin/edit-cut.svg); + } + #context-copy { + background-image: url(chrome://browser/skin/edit-copy.svg); + } + #context-paste { + background-image: url(chrome://browser/skin/edit-paste.svg); + } + #context-delete { + background-image: url(chrome://global/skin/icons/delete.svg); + } + #context-selectall { + background-image: url(./icons/select-all-on.svg); + } + #context-print-selection { + background-image: url(chrome://global/skin/icons/print.svg); + } + + #context-take-screenshot { + background-image: url(chrome://browser/skin/screenshot.svg); + } + + #context-keywordfield { + background-image: url(chrome://browser/skin/bookmark.svg); + } + #context-searchselect, + #context-searchselect-private { + background-image: url(chrome://global/skin/icons/search-glass.svg); + } + + #frame { + background-image: url(./icons/command-frames.svg); + } + + #spell-check-enabled { /* checkbox */ + } + #spell-add-dictionaries-main { + background-image: url(./icons/book-add.svg); + } + #spell-dictionaries { + background-image: url(./icons/book.svg); + } + + #context-bidi-text-direction-toggle { + background-image: url(./icons/text-direction-horizontal-ltr.svg); + } + #context-bidi-page-direction-toggle { + background-image: url(./icons/document-landscape-split-hint.svg); + } + + #context-viewpartialsource-selection, + #context-viewsource { + background-image: url(./icons/search-file.svg); + } + #context-inspect-a11y { + background-image: url(chrome://devtools/skin/images/tool-accessibility.svg); + } + #context-inspect { + background-image: url(chrome://devtools/skin/images/command-pick.svg) + } + + #context-media-eme-learnmore { /* iconic */ + } } From 071a3b592e0238f816c9f298ddc224e49d87179e Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 11:48:47 +0900 Subject: [PATCH 26/71] Fix: Context Menu - Icons color --- icons/arrow-sort-down-lines.svg | 4 ++-- icons/book-add.svg | 4 ++-- icons/book.svg | 6 +++--- icons/calendar-agenda.svg | 4 ++-- icons/code.svg | 4 ++-- icons/document-landscape-split-hint.svg | 14 +++++++------- icons/eye-hide.svg | 8 ++++---- icons/eye-show.svg | 6 +++--- icons/image-add.svg | 4 ++-- icons/image-alt-text.svg | 8 ++++---- icons/image-arrow-counterclockwise.svg | 8 ++++---- icons/key-multiple.svg | 4 ++-- icons/link-square.svg | 6 +++--- icons/password.svg | 10 +++++----- icons/resize-image.svg | 4 ++-- icons/select-all-on.svg | 4 ++-- icons/text-direction-horizontal-ltr.svg | 4 ++-- icons/text-number-format.svg | 4 ++-- icons/text-proofing-tools.svg | 8 ++++---- icons/time-picker.svg | 4 ++-- icons/video.svg | 4 ++-- 21 files changed, 61 insertions(+), 61 deletions(-) diff --git a/icons/arrow-sort-down-lines.svg b/icons/arrow-sort-down-lines.svg index 068440c..c3efd48 100644 --- a/icons/arrow-sort-down-lines.svg +++ b/icons/arrow-sort-down-lines.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/book-add.svg b/icons/book-add.svg index f7482a6..701f923 100644 --- a/icons/book-add.svg +++ b/icons/book-add.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/book.svg b/icons/book.svg index 8627f13..e60114d 100644 --- a/icons/book.svg +++ b/icons/book.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/icons/calendar-agenda.svg b/icons/calendar-agenda.svg index c89b9b8..dd6470c 100644 --- a/icons/calendar-agenda.svg +++ b/icons/calendar-agenda.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/code.svg b/icons/code.svg index 1885f67..e9aa4fc 100644 --- a/icons/code.svg +++ b/icons/code.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/document-landscape-split-hint.svg b/icons/document-landscape-split-hint.svg index ece0c98..fc9f621 100644 --- a/icons/document-landscape-split-hint.svg +++ b/icons/document-landscape-split-hint.svg @@ -1,8 +1,8 @@ - - - - - - - + + + + + + + diff --git a/icons/eye-hide.svg b/icons/eye-hide.svg index 37324bb..2b64e30 100644 --- a/icons/eye-hide.svg +++ b/icons/eye-hide.svg @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/icons/eye-show.svg b/icons/eye-show.svg index fefcf0d..51e4fb5 100644 --- a/icons/eye-show.svg +++ b/icons/eye-show.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/icons/image-add.svg b/icons/image-add.svg index 59bfb90..871abf8 100644 --- a/icons/image-add.svg +++ b/icons/image-add.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/image-alt-text.svg b/icons/image-alt-text.svg index 1a77a4b..f568344 100644 --- a/icons/image-alt-text.svg +++ b/icons/image-alt-text.svg @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/icons/image-arrow-counterclockwise.svg b/icons/image-arrow-counterclockwise.svg index 5edf628..782ff9c 100644 --- a/icons/image-arrow-counterclockwise.svg +++ b/icons/image-arrow-counterclockwise.svg @@ -1,5 +1,5 @@ - - - - + + + + diff --git a/icons/key-multiple.svg b/icons/key-multiple.svg index c04c3e9..36f5121 100644 --- a/icons/key-multiple.svg +++ b/icons/key-multiple.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/link-square.svg b/icons/link-square.svg index 4aa865b..36362fe 100644 --- a/icons/link-square.svg +++ b/icons/link-square.svg @@ -1,4 +1,4 @@ - - - + + + diff --git a/icons/password.svg b/icons/password.svg index 22c034a..a485de7 100644 --- a/icons/password.svg +++ b/icons/password.svg @@ -1,6 +1,6 @@ - - - - - + + + + + diff --git a/icons/resize-image.svg b/icons/resize-image.svg index a17ce95..c68de66 100644 --- a/icons/resize-image.svg +++ b/icons/resize-image.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/select-all-on.svg b/icons/select-all-on.svg index 3b15ebd..88c9496 100644 --- a/icons/select-all-on.svg +++ b/icons/select-all-on.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/text-direction-horizontal-ltr.svg b/icons/text-direction-horizontal-ltr.svg index de52f53..e5ad45e 100644 --- a/icons/text-direction-horizontal-ltr.svg +++ b/icons/text-direction-horizontal-ltr.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/text-number-format.svg b/icons/text-number-format.svg index ee14184..fb4d19b 100644 --- a/icons/text-number-format.svg +++ b/icons/text-number-format.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/text-proofing-tools.svg b/icons/text-proofing-tools.svg index 29d5671..038e9e1 100644 --- a/icons/text-proofing-tools.svg +++ b/icons/text-proofing-tools.svg @@ -1,6 +1,6 @@ - - + + - - + + diff --git a/icons/time-picker.svg b/icons/time-picker.svg index 131a8ed..75cf3d4 100644 --- a/icons/time-picker.svg +++ b/icons/time-picker.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/video.svg b/icons/video.svg index 8ea9798..4d1fd9e 100644 --- a/icons/video.svg +++ b/icons/video.svg @@ -1,3 +1,3 @@ - - + + From b9c2fe4461998ec36b1fb5ab21007f00cdb89c85 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 11:51:53 +0900 Subject: [PATCH 27/71] Fix: Context Menu - Content area's missing icons --- icons/image-copy.svg | 5 +++++ userChrome.css | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 icons/image-copy.svg diff --git a/icons/image-copy.svg b/icons/image-copy.svg new file mode 100644 index 0000000..be0e089 --- /dev/null +++ b/icons/image-copy.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/userChrome.css b/userChrome.css index b19b49c..b2aabaf 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1174,6 +1174,7 @@ background-image: url(chrome://global/skin/media/audio.svg); } #context-copyimage-contents { + background-image: url(./icons/image-copy.svg); } #context-copyimage, #context-copyvideourl, @@ -1189,7 +1190,7 @@ background-image: url(chrome://global/skin/icons/info.svg); } #context-viewimagedesc { - background-image: url(./icons/image-alt-text); + background-image: url(./icons/image-alt-text.svg); } #context-setDesktopBackground { background-image: url(./icons/resize-image.svg); From 9136041f6a8e39f8f2c9f5b54bbe2bbbf73bc46f Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 11:54:44 +0900 Subject: [PATCH 28/71] Fix: image copy icon color --- icons/image-copy.svg | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/icons/image-copy.svg b/icons/image-copy.svg index be0e089..6140e6f 100644 --- a/icons/image-copy.svg +++ b/icons/image-copy.svg @@ -1,5 +1,5 @@ - - - - + + + + From 99317ab6fc19119a95cffe7ff3e47daba31adf80 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 14:20:55 +0900 Subject: [PATCH 29/71] Fix: Context Menu - Remove checkbox's icons --- userChrome.css | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/userChrome.css b/userChrome.css index b2aabaf..147c419 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1027,8 +1027,8 @@ background-image: url(chrome://global/skin/icons/undo.svg); } - #toggle_toolbar-menubar { - background-image: url(./icons/calendar-agenda.svg); + #toggle_toolbar-menubar { /* checkbox */ + /* background-image: url(./icons/calendar-agenda.svg); */ } #toggle_PersonalToolbar { background-image: url(chrome://browser/skin/bookmarks-toolbar.svg); @@ -1132,8 +1132,8 @@ #context-media-playbackrate { background-image: url(./icons/time-picker.svg); } - #context-media-loop { - background-image: url(./icons/arrow-repeat-all.svg); + #context-media-loop { /* checkbox */ + /* background-image: url(./icons/arrow-repeat-all.svg); */ } #context-leave-dom-fullscreen { background-image: url(chrome://global/skin/media/fullscreenExitButton.svg); @@ -1151,8 +1151,8 @@ #context-viewvideo { background-image: url(./icons/video.svg); } - #context-video-pictureinpicture { - background-image: url(chrome://global/skin/media/picture-in-picture-open.svg); + #context-video-pictureinpicture { /* checkbox */ + /* background-image: url(chrome://global/skin/media/picture-in-picture-open.svg); */ } #context-reloadimage { From b0d991e9e3336ebaba33bea78db03456ddde9d83 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 14:25:28 +0900 Subject: [PATCH 30/71] Add: Context Menu - Pictureinpicture toggle icon --- userChrome.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/userChrome.css b/userChrome.css index 147c419..0a90442 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1291,4 +1291,9 @@ #context-media-eme-learnmore { /* iconic */ } + + /*= pictureInPictureToggleContextMenu ======================================*/ + #pictureInPictureToggleContextMenu > menuitem[oncommand="PictureInPicture.hideToggle();"] { + background-image: url(./icons/eye-hide.svg); + } } From 02fd2448671c18f7de9d8534a0d52450ed726f43 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 15:51:34 +0900 Subject: [PATCH 31/71] Add: icons from @microsoft 's fluentui-system-icons --- icons/star-line-horizontal.svg | 3 +++ icons/text-sort-ascending.svg | 3 +++ icons/vertical-line.svg | 1 + 3 files changed, 7 insertions(+) create mode 100644 icons/star-line-horizontal.svg create mode 100644 icons/text-sort-ascending.svg create mode 100644 icons/vertical-line.svg diff --git a/icons/star-line-horizontal.svg b/icons/star-line-horizontal.svg new file mode 100644 index 0000000..a900073 --- /dev/null +++ b/icons/star-line-horizontal.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/text-sort-ascending.svg b/icons/text-sort-ascending.svg new file mode 100644 index 0000000..0af361b --- /dev/null +++ b/icons/text-sort-ascending.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/vertical-line.svg b/icons/vertical-line.svg new file mode 100644 index 0000000..c8d4ad4 --- /dev/null +++ b/icons/vertical-line.svg @@ -0,0 +1 @@ + From c04f0d5df135913dddad9ee2b7e03606fe44f154 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 15:53:57 +0900 Subject: [PATCH 32/71] Fix: Context Line - placeContext icons color --- icons/star-line-horizontal.svg | 4 ++-- icons/text-sort-ascending.svg | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/icons/star-line-horizontal.svg b/icons/star-line-horizontal.svg index a900073..734beba 100644 --- a/icons/star-line-horizontal.svg +++ b/icons/star-line-horizontal.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/text-sort-ascending.svg b/icons/text-sort-ascending.svg index 0af361b..d5613d1 100644 --- a/icons/text-sort-ascending.svg +++ b/icons/text-sort-ascending.svg @@ -1,3 +1,3 @@ - - + + From 7462390820f4502130474d0e6ef6697aa2a00996 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 15:55:49 +0900 Subject: [PATCH 33/71] Add: Context Line - Place context icons --- userChrome.css | 76 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 74 insertions(+), 2 deletions(-) diff --git a/userChrome.css b/userChrome.css index 0a90442..a850bfb 100644 --- a/userChrome.css +++ b/userChrome.css @@ -929,7 +929,7 @@ /*= tabContextMenu =========================================================*/ #context_openANewTab { - background-image: url(chrome://browser/skin/new-tab.svg) !important; + background-image: url(chrome://browser/skin/new-tab.svg); } #context_reloadTab, @@ -1030,7 +1030,7 @@ #toggle_toolbar-menubar { /* checkbox */ /* background-image: url(./icons/calendar-agenda.svg); */ } - #toggle_PersonalToolbar { + #toggle_PersonalToolbar { /* Also placeContext */ background-image: url(chrome://browser/skin/bookmarks-toolbar.svg); } @@ -1296,4 +1296,76 @@ #pictureInPictureToggleContextMenu > menuitem[oncommand="PictureInPicture.hideToggle();"] { background-image: url(./icons/eye-hide.svg); } + + /*= placeContext ===========================================================*/ + #placesContext_open { + background-image: url(./icons/link-square.svg); + } + #placesContext_openBookmarkContainer\:tabs, + #placesContext_openBookmarkLinks\:tabs { + background-image: url(./icons/movetowindow-16.svg); + } + #placesContext_open\:newtab, + #placesContext_openContainer\:tabs, + #placesContext_openLinks\:tabs { + background-image: url(chrome://browser/skin/new-tab.svg); + } + #placesContext_open\:newwindow { + background-image: url(chrome://browser/skin/window.svg); + } + #placesContext_open\:newprivatewindow { + background-image: url(chrome://browser/skin/privateBrowsing.svg); + } + + #placesContext_show_bookmark\:info, + #placesContext_show\:info, + #placesContext_show_folder\:info { + background-image: url(chrome://global/skin/icons/edit.svg); + } + #placesContext_deleteBookmark, + #placesContext_deleteFolder, + #placesContext_delete, + #placesContext_delete_history { + background-image: url(chrome://global/skin/icons/delete.svg); + } + #placesContext_deleteHost { + background-image: url(./icons/eye-hide.svg); + } + #placesContext_sortBy\:name { + background-image: url(./icons/text-sort-ascending.svg); + } + + #placesContext_cut { + background-image: url(chrome://browser/skin/edit-cut.svg); + } + #placesContext_copy { + background-image: url(chrome://browser/skin/edit-copy.svg); + } + #placesContext_paste_group { + background-image: url(chrome://browser/skin/edit-paste.svg); + } + + #placesContext_new\:bookmark { + background-image: url(chrome://browser/skin/bookmark.svg); + } + #placesContext_new\:folder { + background-image: url(chrome://global/skin/icons/folder.svg); + } + #placesContext_new\:separator { + background-image: url(./icons/vertical-line.svg); + } + + #placesContext_paste { + background-image: url(chrome://browser/skin/edit-paste.svg); + } + + #placesContext_createBookmark { + background-image: url(chrome://browser/skin/bookmark.svg); + } + #show-other-bookmarks_PersonalToolbar { /* checkbox */ + /* background-image: url(./icons/star-line-horizontal.svg); */ + } + #placesContext_showAllBookmarks { + background-image: url(chrome://browser/skin/bookmark-star-on-tray.svg); + } } From 4abe8589ad649b3fba34736e943a8d6d619b4cd7 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 22 Jun 2021 16:19:31 +0900 Subject: [PATCH 34/71] Add: Context Line - Page Action icons --- userChrome.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/userChrome.css b/userChrome.css index a850bfb..f33e835 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1368,4 +1368,12 @@ #placesContext_showAllBookmarks { background-image: url(chrome://browser/skin/bookmark-star-on-tray.svg); } + + /*= pageActionContextMenu ==================================================*/ + .pageActionContextMenuItem.extensionPinned.extensionUnpinned.manageExtensionItem { + background-image: url(chrome://global/skin/icons/settings.svg); + } + .pageActionContextMenuItem.extensionPinned.extensionUnpinned.removeExtensionItem { + background-image: url(chrome://global/skin/icons/delete.svg); + } } From 8f0fd5473f2b537d5eb8e76586cde6a3c0ea86bb Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 23 Jun 2021 09:08:52 +0900 Subject: [PATCH 35/71] Add: Context Menu - Customization icons --- userChrome.css | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/userChrome.css b/userChrome.css index f33e835..a8c94e4 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1376,4 +1376,25 @@ .pageActionContextMenuItem.extensionPinned.extensionUnpinned.removeExtensionItem { background-image: url(chrome://global/skin/icons/delete.svg); } + + /*= customizationPanelItemContextMenu ======================================*/ + #customizationPanelItemContextMenuUnpin { + background-image: url(./icons/unpin-tab.svg); + } + .customize-context-removeFromPanel { + background-image: url(chrome://global/skin/icons/delete.svg); + } + + /*= customizationPaletteItemContextMenu ====================================*/ + .customize-context-addToToolbar { + background-image: url(chrome://devtools/skin/images/dock-bottom.svg); + } + .customize-context-addToPanel { + background-image: url(chrome://browser/skin/menu.svg); + } + + /*= customizationPanelContextMenu ==========================================*/ + #customizationPanelContextMenu > menuitem[command="cmd_CustomizeToolbars"] { + background-image: url(chrome://browser/skin/customize.svg); + } } From bfeb3a3dbbbd7c9aab53085dac1f240517902f8e Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 23 Jun 2021 10:25:23 +0900 Subject: [PATCH 36/71] Add: icons from @microsoft 's fluentui-system-icons --- icons/broom.svg | 3 +++ icons/checkmark-circle.svg | 3 +++ 2 files changed, 6 insertions(+) create mode 100644 icons/broom.svg create mode 100644 icons/checkmark-circle.svg diff --git a/icons/broom.svg b/icons/broom.svg new file mode 100644 index 0000000..aafae3f --- /dev/null +++ b/icons/broom.svg @@ -0,0 +1,3 @@ + + + diff --git a/icons/checkmark-circle.svg b/icons/checkmark-circle.svg new file mode 100644 index 0000000..e552cd8 --- /dev/null +++ b/icons/checkmark-circle.svg @@ -0,0 +1,3 @@ + + + From 82846dc3dc60ea28fe160d7486dfdca2077b9e66 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 23 Jun 2021 10:37:29 +0900 Subject: [PATCH 37/71] Add: Context Menu - Download menu icons --- icons/broom.svg | 4 ++-- icons/checkmark-circle.svg | 4 ++-- userChrome.css | 38 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 4 deletions(-) diff --git a/icons/broom.svg b/icons/broom.svg index aafae3f..7428fad 100644 --- a/icons/broom.svg +++ b/icons/broom.svg @@ -1,3 +1,3 @@ - - + + diff --git a/icons/checkmark-circle.svg b/icons/checkmark-circle.svg index e552cd8..accc8e0 100644 --- a/icons/checkmark-circle.svg +++ b/icons/checkmark-circle.svg @@ -1,3 +1,3 @@ - - + + diff --git a/userChrome.css b/userChrome.css index a8c94e4..0bbc828 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1397,4 +1397,42 @@ #customizationPanelContextMenu > menuitem[command="cmd_CustomizeToolbars"] { background-image: url(chrome://browser/skin/customize.svg); } + + /*= downloads-button-autohide-panel ========================================*/ + #downloads-button-autohide-checkbox { /* checkbox */ + } + + /*= downloadsContextMenu ===================================================*/ + .downloadPauseMenuItem { + background-image: url(chrome://global/skin/media/pause-fill.svg); + } + .downloadResumeMenuItem { + background-image: url(chrome://global/skin/media/play-fill.svg); + } + .downloadUnblockMenuItem { + background-image: url(./icons/checkmark-circle.svg); + } + .downloadUseSystemDefaultMenuItem { + background-image: url(chrome://browser/skin/open.svg); + } + .downloadAlwaysUseSystemDefaultMenuItem { /* checkbox */ + } + .downloadShowMenuItem { + background-image: url(chrome://global/skin/icons/folder.svg); + } + + #downloadsContextMenu > menuitem[command="downloadsCmd_openReferrer"] { + background-image: url(./icons/link-square.svg); + } + #downloadsContextMenu > menuitem[command="downloadsCmd_copyLocation"] { + background-image: url(chrome://browser/skin/link.svg); + } + + .downloadRemoveFromHistoryMenuItem { + background-image: url(chrome://global/skin/icons/delete.svg); + } + #downloadsContextMenu > menuitem[command="downloadsCmd_clearList"], + #downloadsContextMenu > menuitem[command="downloadsCmd_clearDownloads"] { + background-image: url(./icons/broom.svg); + } } From 0f31cde44e9d9bba2145e6e42fd3a3496412c39f Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 23 Jun 2021 10:38:02 +0900 Subject: [PATCH 38/71] Add: Context Menu - Syncedtabs icons --- userChrome.css | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/userChrome.css b/userChrome.css index 0bbc828..71ac5fa 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1435,4 +1435,60 @@ #downloadsContextMenu > menuitem[command="downloadsCmd_clearDownloads"] { background-image: url(./icons/broom.svg); } + + /*= SyncedTabsSidebarContext ===============================================*/ + #syncedTabsOpenSelected { + background-image: url(./icons/link-square.svg); + } + #syncedTabsOpenSelectedInTab { + background-image: url(chrome://browser/skin/new-tab.svg); + } + #syncedTabsOpenSelectedInWindow { + background-image: url(chrome://browser/skin/window.svg); + } + #syncedTabsOpenSelectedInPrivateWindow { + background-image: url(chrome://browser/skin/privateBrowsing.svg); + } + + #syncedTabsBookmarkSelected { + background-image: url(chrome://browser/skin/bookmark.svg); + } + #syncedTabsCopySelected { + background-image: url(chrome://browser/skin/link.svg); + } + + #syncedTabsOpenAllInTabs { + background-image: url(./icons/movetowindow-16.svg); + } + #syncedTabsManageDevices { + background-image: url(chrome://global/skin/icons/settings.svg); + } + #syncedTabsRefresh { + background-image: url(chrome://browser/skin/sync.svg); + } + + /*= SyncedTabsSidebarTabsFilterContext =====================================*/ + #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_undo"] { + background-image: url(chrome://global/skin/icons/undo.svg); + } + #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_cut"] { + background-image: url(chrome://browser/skin/edit-cut.svg); + } + #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_copy"]{ + background-image: url(chrome://browser/skin/edit-copy.svg); + } + #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_paste"]{ + background-image: url(chrome://browser/skin/edit-paste.svg); + } + #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_delete"]{ + background-image: url(chrome://global/skin/icons/delete.svg); + } + + #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_selectAll"]{ + background-image: url(./icons/select-all-on.svg); + } + + #syncedTabsRefreshFilter { + background-image: url(chrome://browser/skin/sync.svg); + } } From 6f49b7598127326dd292dfff68a8ca492c9cc108 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 23 Jun 2021 20:57:20 +0900 Subject: [PATCH 39/71] Fix: Context Menu - Source code order --- userChrome.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userChrome.css b/userChrome.css index 71ac5fa..b8d6624 100644 --- a/userChrome.css +++ b/userChrome.css @@ -917,11 +917,11 @@ @media (-moz-os-version: windows-win7 ), (-moz-os-version: windows-win8 ), (-moz-os-version: windows-win10) { - :not(menu, #ContentSelectDropdown) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), - :not(menu, #ContentSelectDropdown) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), :root { --context-menu-background-padding: 1em; } + :not(menu, #ContentSelectDropdown) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), + :not(menu, #ContentSelectDropdown) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), #blockedPopupDontShowMessage { padding-inline-start: calc(var(--context-menu-background-padding) + var(--menu-padding) + var(--context-menu-background-padding-default) + 16px) !important; } From eb5b7ed39360eea74154ce4ee9ac83fbcb452137 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Wed, 23 Jun 2021 23:50:03 +0900 Subject: [PATCH 40/71] Fix: Context Menu - Padding exclude context-navigation --- userChrome.css | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/userChrome.css b/userChrome.css index b8d6624..95dfa31 100644 --- a/userChrome.css +++ b/userChrome.css @@ -902,13 +902,13 @@ background-repeat: no-repeat !important; } - /* Layout */ + /* Padding */ :root { --context-menu-background-padding-default: 5px; --context-menu-background-padding: var(--context-menu-background-padding-default); } - :not(menu, #ContentSelectDropdown) > menupopup > menuitem, - :not(menu, #ContentSelectDropdown) > menupopup > menu, + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem, + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menu, #blockedPopupDontShowMessage { background-position: left var(--context-menu-background-padding) center !important; padding-inline-start: var(--context-menu-background-padding) !important; @@ -920,8 +920,8 @@ :root { --context-menu-background-padding: 1em; } - :not(menu, #ContentSelectDropdown) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), - :not(menu, #ContentSelectDropdown) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), #blockedPopupDontShowMessage { padding-inline-start: calc(var(--context-menu-background-padding) + var(--menu-padding) + var(--context-menu-background-padding-default) + 16px) !important; } From abb3b0a1cda20eed6bf55adce3209e432f550996 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 24 Jun 2021 10:04:36 +0900 Subject: [PATCH 41/71] Fix: Context Menu - Mac padding --- userChrome.css | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/userChrome.css b/userChrome.css index 95dfa31..dba09d3 100644 --- a/userChrome.css +++ b/userChrome.css @@ -914,6 +914,7 @@ padding-inline-start: var(--context-menu-background-padding) !important; } + /* Padding - Windows */ @media (-moz-os-version: windows-win7 ), (-moz-os-version: windows-win8 ), (-moz-os-version: windows-win10) { @@ -927,6 +928,27 @@ } } + /* Padding Mac */ + @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { + :root { + --context-menu-background-padding-default: 10px; + --context-menu-mac-padding: 21px; + } + + /* context menu width */ + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), + #blockedPopupDontShowMessage { + padding-inline-end: var(--context-menu-background-padding) !important; + } + + /* text position */ + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem > .menu-text, + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menu > menu-text { + padding-inline-start: var(--context-menu-mac-padding) !important; + } + } + /*= tabContextMenu =========================================================*/ #context_openANewTab { background-image: url(chrome://browser/skin/new-tab.svg); From 68e1596467422350774f9c0bae0c7be2fd3f94ce Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 24 Jun 2021 10:53:26 +0900 Subject: [PATCH 42/71] Fix Context Menu - arrow align at mac --- userChrome.css | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/userChrome.css b/userChrome.css index dba09d3..db0b122 100644 --- a/userChrome.css +++ b/userChrome.css @@ -535,17 +535,19 @@ padding-block: var(--menu-padding, 0.5em) !important; } - :root:not([uidensity=touch]) .menu-text, .menu-iconic-text { - padding-inline-end: 0 !important; /* Original: 2px */ - } - :root:not([uidensity=touch]) .menupopup-arrowscrollbox { - padding-block: 1px !important; /* Original: 4px*/ - } - :root:not([uidensity=touch]) #context-navigation:not([hidden]) { - padding: 0 0 1px !important; /* Original: 0 0 4px*/ - } - :root:not([uidensity=touch]) .menu-right { - margin-right: 6px !important; /* Original: 12px */ + @supports not -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { + :root:not([uidensity=touch]) .menu-text, .menu-iconic-text { + padding-inline-end: 0 !important; /* Original: 2px */ + } + :root:not([uidensity=touch]) .menupopup-arrowscrollbox { + padding-block: 1px !important; /* Original: 4px*/ + } + :root:not([uidensity=touch]) #context-navigation:not([hidden]) { + padding: 0 0 1px !important; /* Original: 0 0 4px*/ + } + :root:not([uidensity=touch]) .menu-right { + margin-right: 6px !important; /* Original: 12px */ + } } /** Panel - Icons ***********************************************************/ From c9aa486021de765eecd0c6792e474e8652bd25c6 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 24 Jun 2021 10:57:58 +0900 Subject: [PATCH 43/71] Add: Installer - Mac profile path --- install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install.sh b/install.sh index 8e8ca4e..56d9377 100755 --- a/install.sh +++ b/install.sh @@ -203,6 +203,7 @@ multiselect() { firefoxProfileDirPaths=( ~/.mozilla/firefox ~/.var/app/org.mozilla.firefox/.mozilla/firefox + ~/Library/Application\ Support/Firefox/Profiles ) check_profile_dir() { From 32d3f4b5b049446f060f28e0d91321343a608020 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 24 Jun 2021 11:02:23 +0900 Subject: [PATCH 44/71] Add: Installer - Upgrade RFC --- install.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/install.sh b/install.sh index 56d9377..efd08a5 100755 --- a/install.sh +++ b/install.sh @@ -405,6 +405,28 @@ install_profile() { lepton_ok_message "End install" } +#** Lepton Info File *********************************************************** +#== Info File format & update policy =========================================== +## `LEPTON` file +# If this file exist in same directory as the `userChrome.css` file, +# it is recognized as the "Lepton" installation directory. + +## `lepton.ini` file Format +# [Profile PATH] +# Type=Local | Release | Git +# Ver=unknown | | +# Branch=master | photon-style + +## Release's `INFO` file Format +# Ver= +# Branch=master | photon-style + +## Update Policy +# Type +# - Local(unknown): force latest commit update +# - Release(): force latest tag update +# - Git: latest commit update + #** Main *********************************************************************** install_lepton() { local profileDir="" From f855f3b6662b94038878ee40178fafa5d427d82a Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 24 Jun 2021 11:43:22 +0900 Subject: [PATCH 45/71] Add: Context Menu - Mac native menu icon support --- userChrome.css | 318 +++++++++++++++++++++++++------------------------ 1 file changed, 165 insertions(+), 153 deletions(-) diff --git a/userChrome.css b/userChrome.css index db0b122..724cdba 100644 --- a/userChrome.css +++ b/userChrome.css @@ -898,10 +898,22 @@ :not(menu, #ContentSelectDropdown) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), :not(menu, #ContentSelectDropdown) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), #blockedPopupDontShowMessage { + /* Color */ -moz-context-properties: fill, fill-opacity !important; fill: currentColor !important; + + /* Layout */ background-size: 16px !important; background-repeat: no-repeat !important; + background-image: var(--menuitem-image); + } + + /* For native context menus on macOS */ + @supports -moz-bool-pref("widget.macos.native-context-menus") { + :not(menu, #ContentSelectDropdown) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), + :not(menu, #ContentSelectDropdown) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist) { + list-style-image: var(--menuitem-image); + } } /* Padding */ @@ -953,124 +965,124 @@ /*= tabContextMenu =========================================================*/ #context_openANewTab { - background-image: url(chrome://browser/skin/new-tab.svg); + --menuitem-image: url(chrome://browser/skin/new-tab.svg); } #context_reloadTab, #context_reloadSelectedTabs { - background-image: url(chrome://browser/skin/reload.svg); + --menuitem-image: url(chrome://browser/skin/reload.svg); } #context_toggleMuteTab, #context_toggleMuteSelectedTabs { - background-image: url(chrome://browser/skin/tabbrowser/tab-audio-muted-small.svg); + --menuitem-image: url(chrome://browser/skin/tabbrowser/tab-audio-muted-small.svg); } #context_toggleMuteTab[muted], #context_toggleMuteSelectedTabs[muted] { - background-image: url(chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg); + --menuitem-image: url(chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg); } #context_pinTab, #context_pinSelectedTabs { - background-image: url(./icons/pin-tab.svg); + --menuitem-image: url(./icons/pin-tab.svg); } #context_unpinTab, #context_unpinSelectedTabs { - background-image: url(./icons/unpin-tab.svg); + --menuitem-image: url(./icons/unpin-tab.svg); } #context_duplicateTab, #context_duplicateTabs { - background-image: url(./icons/tab-copy.svg); + --menuitem-image: url(./icons/tab-copy.svg); } #context_bookmarkTab, #context_bookmarkSelectedTabs { - background-image: url(chrome://browser/skin/bookmark.svg); + --menuitem-image: url(chrome://browser/skin/bookmark.svg); } #context_moveTabOptions { - background-image: url(./icons/arrow-swap.svg); + --menuitem-image: url(./icons/arrow-swap.svg); } #context_sendTabToDevice { - background-image: url(chrome://browser/skin/send-to-device.svg); + --menuitem-image: url(chrome://browser/skin/send-to-device.svg); } #context_reopenInContainer { - background-image: url(./icons/container-openin-16.svg); + --menuitem-image: url(./icons/container-openin-16.svg); } #context_selectAllTabs { - background-image: url(./icons/tab-multiple.svg); + --menuitem-image: url(./icons/tab-multiple.svg); } #context_closeTab { - background-image: url(chrome://global/skin/icons/close.svg); + --menuitem-image: url(chrome://global/skin/icons/close.svg); } #context_closeTabOptions { } #context_undoCloseTab { - background-image: url(chrome://global/skin/icons/undo.svg); + --menuitem-image: url(chrome://global/skin/icons/undo.svg); } /*= new-tab-button-popup ===================================================*/ #new-tab-button-popup > menuitem[command="Browser:OpenAboutContainers"] { - background-image: url(chrome://global/skin/icons/settings.svg); + --menuitem-image: url(chrome://global/skin/icons/settings.svg); } /*= toolbar-context-menu ===================================================*/ .customize-context-manageExtension { - background-image: url(chrome://global/skin/icons/settings.svg); + --menuitem-image: url(chrome://global/skin/icons/settings.svg); } .customize-context-removeExtension { - background-image: url(chrome://global/skin/icons/delete.svg); + --menuitem-image: url(chrome://global/skin/icons/delete.svg); } .customize-context-reportExtension { - background-image: url(./icons/send.svg); + --menuitem-image: url(./icons/send.svg); } .customize-context-moveToPanel { - background-image: url(chrome://browser/skin/pin-12.svg); + --menuitem-image: url(chrome://browser/skin/pin-12.svg); } .toolbar-context-autohide-downloads-button { - background-image: url(./icons/password-hide.svg); + --menuitem-image: url(./icons/password-hide.svg); } .customize-context-removeFromToolbar { - background-image: url(chrome://global/skin/icons/delete.svg); + --menuitem-image: url(chrome://global/skin/icons/delete.svg); } #toolbar-context-openANewTab { - background-image: url(chrome://browser/skin/new-tab.svg); + --menuitem-image: url(chrome://browser/skin/new-tab.svg); } #toolbar-context-reloadSelectedTab, #toolbar-context-reloadSelectedTabs { - background-image: url(chrome://browser/skin/reload.svg); + --menuitem-image: url(chrome://browser/skin/reload.svg); } #toolbar-context-bookmarkSelectedTab, #toolbar-context-bookmarkSelectedTabs { - background-image: url(chrome://browser/skin/bookmark.svg); + --menuitem-image: url(chrome://browser/skin/bookmark.svg); } #toolbar-context-selectAllTabs { - background-image: url(./icons/tab-multiple.svg); + --menuitem-image: url(./icons/tab-multiple.svg); } #toolbar-context-undoCloseTab { - background-image: url(chrome://global/skin/icons/undo.svg); + --menuitem-image: url(chrome://global/skin/icons/undo.svg); } #toggle_toolbar-menubar { /* checkbox */ - /* background-image: url(./icons/calendar-agenda.svg); */ + /* --menuitem-image: url(./icons/calendar-agenda.svg); */ } #toggle_PersonalToolbar { /* Also placeContext */ - background-image: url(chrome://browser/skin/bookmarks-toolbar.svg); + --menuitem-image: url(chrome://browser/skin/bookmarks-toolbar.svg); } menuitem.viewCustomizeToolbar { - background-image: url(chrome://browser/skin/customize.svg); + --menuitem-image: url(chrome://browser/skin/customize.svg); } /*= blockedPopupOptions ====================================================*/ #blockedPopupAllowSite { - background-image: url("chrome://global/skin/icons/check.svg"); + --menuitem-image: url("chrome://global/skin/icons/check.svg"); } #blockedPopupOptions > menuitem[oncommand="gPopupBlockerObserver.editPopupSettings();"] { - background-image: url("chrome://global/skin/icons/edit.svg"); + --menuitem-image: url("chrome://global/skin/icons/edit.svg"); } #blockedPopupDontShowMessage { /* checkbox */ - background-image: url("chrome://global/skin/icons/blocked.svg"); + --menuitem-image: url("chrome://global/skin/icons/blocked.svg"); } /*= autohide-context =======================================================*/ @@ -1078,239 +1090,239 @@ } #autohide-context > menuitem[data-l10n-id="full-screen-exit"] { - background-image: url(chrome://browser/skin/fullscreen-exit.svg); + --menuitem-image: url(chrome://browser/skin/fullscreen-exit.svg); } /*= contentAreaContextMenu =================================================*/ #context-viewsource-goToLine { - background-image: url(./icons/text-number-format.svg); + --menuitem-image: url(./icons/text-number-format.svg); } #context-viewsource-wrapLongLines { /* checkbox */ - /* background-image: url(./icons/arrow-sort-down-lines.svg); */ + /* --menuitem-image: url(./icons/arrow-sort-down-lines.svg); */ } #context-viewsource-highlightSyntax { /* checkbox */ - /* background-image: url(./icons/code.svg); */ + /* --menuitem-image: url(./icons/code.svg); */ } #spell-no-suggestions { - background-image: url(./icons/text-proofing-tools.svg); + --menuitem-image: url(./icons/text-proofing-tools.svg); } #spell-add-to-dictionary { - background-image: url(./icons/book-add.svg); + --menuitem-image: url(./icons/book-add.svg); } #spell-undo-add-to-dictionary { - background-image: url(chrome://global/skin/icons/undo.svg); + --menuitem-image: url(chrome://global/skin/icons/undo.svg); } #context-openlinkincurrent { - background-image: url(./icons/link-square.svg); + --menuitem-image: url(./icons/link-square.svg); } #context-openlinkincontainertab { - background-image: url(chrome://browser/skin/new-tab.svg); + --menuitem-image: url(chrome://browser/skin/new-tab.svg); } #context-openlinkintab { - background-image: url(chrome://browser/skin/new-tab.svg); + --menuitem-image: url(chrome://browser/skin/new-tab.svg); } #context-openlinkinusercontext-menu { - background-image: url(./icons/container-openin-16.svg); + --menuitem-image: url(./icons/container-openin-16.svg); } #context-openlink { - background-image: url(chrome://browser/skin/window.svg); + --menuitem-image: url(chrome://browser/skin/window.svg); } #context-openlinkprivate { - background-image: url(chrome://browser/skin/privateBrowsing.svg); + --menuitem-image: url(chrome://browser/skin/privateBrowsing.svg); } #context-bookmarklink { - background-image: url(chrome://browser/skin/bookmark.svg); + --menuitem-image: url(chrome://browser/skin/bookmark.svg); } #context-savelink { - background-image: url(chrome://browser/skin/save.svg); + --menuitem-image: url(chrome://browser/skin/save.svg); } #context-savelinktopocket { - background-image: url(chrome://browser/skin/pocket-outline.svg); + --menuitem-image: url(chrome://browser/skin/pocket-outline.svg); } #context-copyemail { - background-image: url(chrome://browser/skin/mail.svg); + --menuitem-image: url(chrome://browser/skin/mail.svg); } #context-copylink { - background-image: url(chrome://browser/skin/link.svg); + --menuitem-image: url(chrome://browser/skin/link.svg); } #context-sendlinktodevice { - background-image: url(chrome://browser/skin/send-to-device.svg); + --menuitem-image: url(chrome://browser/skin/send-to-device.svg); } #context-media-play { - background-image: url(chrome://global/skin/media/play-fill.svg); + --menuitem-image: url(chrome://global/skin/media/play-fill.svg); } #context-media-pause { - background-image: url(chrome://global/skin/media/pause-fill.svg); + --menuitem-image: url(chrome://global/skin/media/pause-fill.svg); } #context-media-mute { - background-image: url(chrome://global/skin/media/audio-muted.svg); + --menuitem-image: url(chrome://global/skin/media/audio-muted.svg); } #context-media-unmute { - background-image: url(chrome://global/skin/media/audio.svg); + --menuitem-image: url(chrome://global/skin/media/audio.svg); } #context-media-playbackrate { - background-image: url(./icons/time-picker.svg); + --menuitem-image: url(./icons/time-picker.svg); } #context-media-loop { /* checkbox */ - /* background-image: url(./icons/arrow-repeat-all.svg); */ + /* --menuitem-image: url(./icons/arrow-repeat-all.svg); */ } #context-leave-dom-fullscreen { - background-image: url(chrome://global/skin/media/fullscreenExitButton.svg); + --menuitem-image: url(chrome://global/skin/media/fullscreenExitButton.svg); } #context-video-fullscreen { - background-image: url(chrome://global/skin/media/fullscreenEnterButton.svg); + --menuitem-image: url(chrome://global/skin/media/fullscreenEnterButton.svg); } #context-media-hidecontrols { - background-image: url(./icons/eye-hide.svg); + --menuitem-image: url(./icons/eye-hide.svg); } #context-media-showcontrols { - background-image: url(./icons/eye-show.svg); + --menuitem-image: url(./icons/eye-show.svg); } #context-viewvideo { - background-image: url(./icons/video.svg); + --menuitem-image: url(./icons/video.svg); } #context-video-pictureinpicture { /* checkbox */ - /* background-image: url(chrome://global/skin/media/picture-in-picture-open.svg); */ + /* --menuitem-image: url(chrome://global/skin/media/picture-in-picture-open.svg); */ } #context-reloadimage { - background-image: url(./icons/image-arrow-counterclockwise.svg); + --menuitem-image: url(./icons/image-arrow-counterclockwise.svg); } #context-viewimage { - background-image: url(./icons/image-add.svg); + --menuitem-image: url(./icons/image-add.svg); } #context-saveimage { - background-image: url(./icons/image.svg); + --menuitem-image: url(./icons/image.svg); } #context-video-saveimage { - background-image: url(./icons/video-snapshot.svg); + --menuitem-image: url(./icons/video-snapshot.svg); } #context-savevideo { - background-image: url(./icons/video.svg); + --menuitem-image: url(./icons/video.svg); } #context-saveaudio { - background-image: url(chrome://global/skin/media/audio.svg); + --menuitem-image: url(chrome://global/skin/media/audio.svg); } #context-copyimage-contents { - background-image: url(./icons/image-copy.svg); + --menuitem-image: url(./icons/image-copy.svg); } #context-copyimage, #context-copyvideourl, #context-copyaudiourl { - background-image: url(chrome://browser/skin/link.svg); + --menuitem-image: url(chrome://browser/skin/link.svg); } #context-sendimage, #context-sendvideo, #context-sendaudio { - background-image: url(chrome://browser/skin/mail.svg); + --menuitem-image: url(chrome://browser/skin/mail.svg); } #context-viewimageinfo { - background-image: url(chrome://global/skin/icons/info.svg); + --menuitem-image: url(chrome://global/skin/icons/info.svg); } #context-viewimagedesc { - background-image: url(./icons/image-alt-text.svg); + --menuitem-image: url(./icons/image-alt-text.svg); } #context-setDesktopBackground { - background-image: url(./icons/resize-image.svg); + --menuitem-image: url(./icons/resize-image.svg); } #context-ctp-play { - background-image: url(chrome://global/skin/icons/plugin.svg); + --menuitem-image: url(chrome://global/skin/icons/plugin.svg); } #context-ctp-hide { - background-image: url(chrome://global/skin/icons/plugin-blocked.svg); + --menuitem-image: url(chrome://global/skin/icons/plugin-blocked.svg); } #context-savepage { - background-image: url(chrome://browser/skin/save.svg); + --menuitem-image: url(chrome://browser/skin/save.svg); } #context-pocket { - background-image: url(chrome://browser/skin/pocket-outline.svg); + --menuitem-image: url(chrome://browser/skin/pocket-outline.svg); } #context-sendpagetodevice { - background-image: url(chrome://browser/skin/send-to-device.svg); + --menuitem-image: url(chrome://browser/skin/send-to-device.svg); } #fill-login { - background-image: url(./icons/password.svg); + --menuitem-image: url(./icons/password.svg); } #fill-login-generated-password { - background-image: url(chrome://browser/skin/login.svg); + --menuitem-image: url(chrome://browser/skin/login.svg); } #manage-saved-logins { - background-image: url(./icons/key-multiple.svg); + --menuitem-image: url(./icons/key-multiple.svg); } #context-undo { - background-image: url(chrome://global/skin/icons/undo.svg); + --menuitem-image: url(chrome://global/skin/icons/undo.svg); } #context-redo { } #context-cut { - background-image: url(chrome://browser/skin/edit-cut.svg); + --menuitem-image: url(chrome://browser/skin/edit-cut.svg); } #context-copy { - background-image: url(chrome://browser/skin/edit-copy.svg); + --menuitem-image: url(chrome://browser/skin/edit-copy.svg); } #context-paste { - background-image: url(chrome://browser/skin/edit-paste.svg); + --menuitem-image: url(chrome://browser/skin/edit-paste.svg); } #context-delete { - background-image: url(chrome://global/skin/icons/delete.svg); + --menuitem-image: url(chrome://global/skin/icons/delete.svg); } #context-selectall { - background-image: url(./icons/select-all-on.svg); + --menuitem-image: url(./icons/select-all-on.svg); } #context-print-selection { - background-image: url(chrome://global/skin/icons/print.svg); + --menuitem-image: url(chrome://global/skin/icons/print.svg); } #context-take-screenshot { - background-image: url(chrome://browser/skin/screenshot.svg); + --menuitem-image: url(chrome://browser/skin/screenshot.svg); } #context-keywordfield { - background-image: url(chrome://browser/skin/bookmark.svg); + --menuitem-image: url(chrome://browser/skin/bookmark.svg); } #context-searchselect, #context-searchselect-private { - background-image: url(chrome://global/skin/icons/search-glass.svg); + --menuitem-image: url(chrome://global/skin/icons/search-glass.svg); } #frame { - background-image: url(./icons/command-frames.svg); + --menuitem-image: url(./icons/command-frames.svg); } #spell-check-enabled { /* checkbox */ } #spell-add-dictionaries-main { - background-image: url(./icons/book-add.svg); + --menuitem-image: url(./icons/book-add.svg); } #spell-dictionaries { - background-image: url(./icons/book.svg); + --menuitem-image: url(./icons/book.svg); } #context-bidi-text-direction-toggle { - background-image: url(./icons/text-direction-horizontal-ltr.svg); + --menuitem-image: url(./icons/text-direction-horizontal-ltr.svg); } #context-bidi-page-direction-toggle { - background-image: url(./icons/document-landscape-split-hint.svg); + --menuitem-image: url(./icons/document-landscape-split-hint.svg); } #context-viewpartialsource-selection, #context-viewsource { - background-image: url(./icons/search-file.svg); + --menuitem-image: url(./icons/search-file.svg); } #context-inspect-a11y { - background-image: url(chrome://devtools/skin/images/tool-accessibility.svg); + --menuitem-image: url(chrome://devtools/skin/images/tool-accessibility.svg); } #context-inspect { - background-image: url(chrome://devtools/skin/images/command-pick.svg) + --menuitem-image: url(chrome://devtools/skin/images/command-pick.svg) } #context-media-eme-learnmore { /* iconic */ @@ -1318,108 +1330,108 @@ /*= pictureInPictureToggleContextMenu ======================================*/ #pictureInPictureToggleContextMenu > menuitem[oncommand="PictureInPicture.hideToggle();"] { - background-image: url(./icons/eye-hide.svg); + --menuitem-image: url(./icons/eye-hide.svg); } /*= placeContext ===========================================================*/ #placesContext_open { - background-image: url(./icons/link-square.svg); + --menuitem-image: url(./icons/link-square.svg); } #placesContext_openBookmarkContainer\:tabs, #placesContext_openBookmarkLinks\:tabs { - background-image: url(./icons/movetowindow-16.svg); + --menuitem-image: url(./icons/movetowindow-16.svg); } #placesContext_open\:newtab, #placesContext_openContainer\:tabs, #placesContext_openLinks\:tabs { - background-image: url(chrome://browser/skin/new-tab.svg); + --menuitem-image: url(chrome://browser/skin/new-tab.svg); } #placesContext_open\:newwindow { - background-image: url(chrome://browser/skin/window.svg); + --menuitem-image: url(chrome://browser/skin/window.svg); } #placesContext_open\:newprivatewindow { - background-image: url(chrome://browser/skin/privateBrowsing.svg); + --menuitem-image: url(chrome://browser/skin/privateBrowsing.svg); } #placesContext_show_bookmark\:info, #placesContext_show\:info, #placesContext_show_folder\:info { - background-image: url(chrome://global/skin/icons/edit.svg); + --menuitem-image: url(chrome://global/skin/icons/edit.svg); } #placesContext_deleteBookmark, #placesContext_deleteFolder, #placesContext_delete, #placesContext_delete_history { - background-image: url(chrome://global/skin/icons/delete.svg); + --menuitem-image: url(chrome://global/skin/icons/delete.svg); } #placesContext_deleteHost { - background-image: url(./icons/eye-hide.svg); + --menuitem-image: url(./icons/eye-hide.svg); } #placesContext_sortBy\:name { - background-image: url(./icons/text-sort-ascending.svg); + --menuitem-image: url(./icons/text-sort-ascending.svg); } #placesContext_cut { - background-image: url(chrome://browser/skin/edit-cut.svg); + --menuitem-image: url(chrome://browser/skin/edit-cut.svg); } #placesContext_copy { - background-image: url(chrome://browser/skin/edit-copy.svg); + --menuitem-image: url(chrome://browser/skin/edit-copy.svg); } #placesContext_paste_group { - background-image: url(chrome://browser/skin/edit-paste.svg); + --menuitem-image: url(chrome://browser/skin/edit-paste.svg); } #placesContext_new\:bookmark { - background-image: url(chrome://browser/skin/bookmark.svg); + --menuitem-image: url(chrome://browser/skin/bookmark.svg); } #placesContext_new\:folder { - background-image: url(chrome://global/skin/icons/folder.svg); + --menuitem-image: url(chrome://global/skin/icons/folder.svg); } #placesContext_new\:separator { - background-image: url(./icons/vertical-line.svg); + --menuitem-image: url(./icons/vertical-line.svg); } #placesContext_paste { - background-image: url(chrome://browser/skin/edit-paste.svg); + --menuitem-image: url(chrome://browser/skin/edit-paste.svg); } #placesContext_createBookmark { - background-image: url(chrome://browser/skin/bookmark.svg); + --menuitem-image: url(chrome://browser/skin/bookmark.svg); } #show-other-bookmarks_PersonalToolbar { /* checkbox */ - /* background-image: url(./icons/star-line-horizontal.svg); */ + /* --menuitem-image: url(./icons/star-line-horizontal.svg); */ } #placesContext_showAllBookmarks { - background-image: url(chrome://browser/skin/bookmark-star-on-tray.svg); + --menuitem-image: url(chrome://browser/skin/bookmark-star-on-tray.svg); } /*= pageActionContextMenu ==================================================*/ .pageActionContextMenuItem.extensionPinned.extensionUnpinned.manageExtensionItem { - background-image: url(chrome://global/skin/icons/settings.svg); + --menuitem-image: url(chrome://global/skin/icons/settings.svg); } .pageActionContextMenuItem.extensionPinned.extensionUnpinned.removeExtensionItem { - background-image: url(chrome://global/skin/icons/delete.svg); + --menuitem-image: url(chrome://global/skin/icons/delete.svg); } /*= customizationPanelItemContextMenu ======================================*/ #customizationPanelItemContextMenuUnpin { - background-image: url(./icons/unpin-tab.svg); + --menuitem-image: url(./icons/unpin-tab.svg); } .customize-context-removeFromPanel { - background-image: url(chrome://global/skin/icons/delete.svg); + --menuitem-image: url(chrome://global/skin/icons/delete.svg); } /*= customizationPaletteItemContextMenu ====================================*/ .customize-context-addToToolbar { - background-image: url(chrome://devtools/skin/images/dock-bottom.svg); + --menuitem-image: url(chrome://devtools/skin/images/dock-bottom.svg); } .customize-context-addToPanel { - background-image: url(chrome://browser/skin/menu.svg); + --menuitem-image: url(chrome://browser/skin/menu.svg); } /*= customizationPanelContextMenu ==========================================*/ #customizationPanelContextMenu > menuitem[command="cmd_CustomizeToolbars"] { - background-image: url(chrome://browser/skin/customize.svg); + --menuitem-image: url(chrome://browser/skin/customize.svg); } /*= downloads-button-autohide-panel ========================================*/ @@ -1428,91 +1440,91 @@ /*= downloadsContextMenu ===================================================*/ .downloadPauseMenuItem { - background-image: url(chrome://global/skin/media/pause-fill.svg); + --menuitem-image: url(chrome://global/skin/media/pause-fill.svg); } .downloadResumeMenuItem { - background-image: url(chrome://global/skin/media/play-fill.svg); + --menuitem-image: url(chrome://global/skin/media/play-fill.svg); } .downloadUnblockMenuItem { - background-image: url(./icons/checkmark-circle.svg); + --menuitem-image: url(./icons/checkmark-circle.svg); } .downloadUseSystemDefaultMenuItem { - background-image: url(chrome://browser/skin/open.svg); + --menuitem-image: url(chrome://browser/skin/open.svg); } .downloadAlwaysUseSystemDefaultMenuItem { /* checkbox */ } .downloadShowMenuItem { - background-image: url(chrome://global/skin/icons/folder.svg); + --menuitem-image: url(chrome://global/skin/icons/folder.svg); } #downloadsContextMenu > menuitem[command="downloadsCmd_openReferrer"] { - background-image: url(./icons/link-square.svg); + --menuitem-image: url(./icons/link-square.svg); } #downloadsContextMenu > menuitem[command="downloadsCmd_copyLocation"] { - background-image: url(chrome://browser/skin/link.svg); + --menuitem-image: url(chrome://browser/skin/link.svg); } .downloadRemoveFromHistoryMenuItem { - background-image: url(chrome://global/skin/icons/delete.svg); + --menuitem-image: url(chrome://global/skin/icons/delete.svg); } #downloadsContextMenu > menuitem[command="downloadsCmd_clearList"], #downloadsContextMenu > menuitem[command="downloadsCmd_clearDownloads"] { - background-image: url(./icons/broom.svg); + --menuitem-image: url(./icons/broom.svg); } /*= SyncedTabsSidebarContext ===============================================*/ #syncedTabsOpenSelected { - background-image: url(./icons/link-square.svg); + --menuitem-image: url(./icons/link-square.svg); } #syncedTabsOpenSelectedInTab { - background-image: url(chrome://browser/skin/new-tab.svg); + --menuitem-image: url(chrome://browser/skin/new-tab.svg); } #syncedTabsOpenSelectedInWindow { - background-image: url(chrome://browser/skin/window.svg); + --menuitem-image: url(chrome://browser/skin/window.svg); } #syncedTabsOpenSelectedInPrivateWindow { - background-image: url(chrome://browser/skin/privateBrowsing.svg); + --menuitem-image: url(chrome://browser/skin/privateBrowsing.svg); } #syncedTabsBookmarkSelected { - background-image: url(chrome://browser/skin/bookmark.svg); + --menuitem-image: url(chrome://browser/skin/bookmark.svg); } #syncedTabsCopySelected { - background-image: url(chrome://browser/skin/link.svg); + --menuitem-image: url(chrome://browser/skin/link.svg); } #syncedTabsOpenAllInTabs { - background-image: url(./icons/movetowindow-16.svg); + --menuitem-image: url(./icons/movetowindow-16.svg); } #syncedTabsManageDevices { - background-image: url(chrome://global/skin/icons/settings.svg); + --menuitem-image: url(chrome://global/skin/icons/settings.svg); } #syncedTabsRefresh { - background-image: url(chrome://browser/skin/sync.svg); + --menuitem-image: url(chrome://browser/skin/sync.svg); } /*= SyncedTabsSidebarTabsFilterContext =====================================*/ #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_undo"] { - background-image: url(chrome://global/skin/icons/undo.svg); + --menuitem-image: url(chrome://global/skin/icons/undo.svg); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_cut"] { - background-image: url(chrome://browser/skin/edit-cut.svg); + --menuitem-image: url(chrome://browser/skin/edit-cut.svg); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_copy"]{ - background-image: url(chrome://browser/skin/edit-copy.svg); + --menuitem-image: url(chrome://browser/skin/edit-copy.svg); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_paste"]{ - background-image: url(chrome://browser/skin/edit-paste.svg); + --menuitem-image: url(chrome://browser/skin/edit-paste.svg); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_delete"]{ - background-image: url(chrome://global/skin/icons/delete.svg); + --menuitem-image: url(chrome://global/skin/icons/delete.svg); } #SyncedTabsSidebarTabsFilterContext > menuitem[cmd="cmd_selectAll"]{ - background-image: url(./icons/select-all-on.svg); + --menuitem-image: url(./icons/select-all-on.svg); } #syncedTabsRefreshFilter { - background-image: url(chrome://browser/skin/sync.svg); + --menuitem-image: url(chrome://browser/skin/sync.svg); } } From 529b7045d853f8e85f9b4f6e242733bfb8797012 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 24 Jun 2021 12:22:25 +0900 Subject: [PATCH 46/71] Add: Context Menu - Mac's content page icons --- userChrome.css | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/userChrome.css b/userChrome.css index 724cdba..96c53bd 100644 --- a/userChrome.css +++ b/userChrome.css @@ -1328,6 +1328,25 @@ #context-media-eme-learnmore { /* iconic */ } + @supports -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { + #context-back { + --menuitem-image: url(chrome://browser/skin/back.svg); + } + #context-forward { + --menuitem-image: url(chrome://browser/skin/forward.svg); + } + #context-reload { + --menuitem-image: url(chrome://browser/skin/reload.svg); + } + #context-stop { + --menuitem-image: url(chrome://global/skin/icons/close.svg); + } + + #context-bookmarkpage { + --menuitem-image: url(chrome://browser/skin/bookmark.svg); + } + } + /*= pictureInPictureToggleContextMenu ======================================*/ #pictureInPictureToggleContextMenu > menuitem[oncommand="PictureInPicture.hideToggle();"] { --menuitem-image: url(./icons/eye-hide.svg); From e80906b25e7208b5c53b870e04eb76b1094b52bc Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Thu, 24 Jun 2021 14:17:18 +0900 Subject: [PATCH 47/71] Fix: Context Menu - Checkbox menuitem padding --- userChrome.css | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/userChrome.css b/userChrome.css index 96c53bd..08be8f6 100644 --- a/userChrome.css +++ b/userChrome.css @@ -889,8 +889,8 @@ /** Context Menu - Icons ****************************************************/ /*= Layout =================================================================*/ - menupopup menuitem, - menupopup menu { + menupopup menuitem:not([type="checkbox"]), + menupopup menu:not([type="checkbox"]) { -moz-appearance: none !important; /* Linux: menulist */ } @@ -961,6 +961,12 @@ :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menu > menu-text { padding-inline-start: var(--context-menu-mac-padding) !important; } + + /* Checkbox menuitem, None iconic menu */ + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem[type="checkbox"], + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menu:not(.menu-iconic) { + padding-inline-start: calc(var(--context-menu-background-padding) + var(--context-menu-mac-padding)) !important; + } } /*= tabContextMenu =========================================================*/ From e66c3a82c4795a19b2e4fdd4e0838ddc4d522031 Mon Sep 17 00:00:00 2001 From: MS_Y Date: Thu, 24 Jun 2021 14:40:24 +0000 Subject: [PATCH 48/71] Fix: Unselected Tab - Divide line thickness after latest tab #104 --- userChrome.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userChrome.css b/userChrome.css index f160fc8..902a355 100644 --- a/userChrome.css +++ b/userChrome.css @@ -320,7 +320,7 @@ } .tabbrowser-tab[last-visible-tab] .tab-background::after { right: 0; - transform: translateX(.5px) translateY(calc(-50% + 1px)) !important; + transform: translateX(1.5px) translateY(calc(-50% + 1px)) !important; } .tabbrowser-tab:is([visuallyselected], [multiselected], :hover) + .tabbrowser-tab:not([visuallyselected]) .tab-background::before, From 20b85f384f7ddbd51198828c412c809528fce48b Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 25 Jun 2021 09:11:30 +0900 Subject: [PATCH 49/71] Fix: Context Menu - Icons layout at touch density --- userChrome.css | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/userChrome.css b/userChrome.css index 902a355..4ed14ba 100644 --- a/userChrome.css +++ b/userChrome.css @@ -546,15 +546,18 @@ } /** Menu - Reduce Padding ***************************************************/ - :root:not([uidensity=touch]) { + :root { --menu-padding: 0.35em; } :root[uidensity=compact] { --menu-padding: 0.25em; } + :root[uidensity=touch] { + --menu-padding: 0.5em; + } menupopup > menuitem, menupopup > menu { /* Original: 0.5em */ - padding-block: var(--menu-padding, 0.5em) !important; + padding-block: var(--menu-padding) !important; } @supports not -moz-bool-pref("layout.css.osx-font-smoothing.enabled") { @@ -961,11 +964,18 @@ (-moz-os-version: windows-win10) { :root { --context-menu-background-padding: 1em; + --context-menu-text-padding: calc(var(--menu-padding) + var(--context-menu-background-padding-default) + 16px); } + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem:not(.menuitem-iconic, [type="checkbox"], .in-menulist), :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menu:not(.menu-iconic, [type="checkbox"], .in-menulist), #blockedPopupDontShowMessage { - padding-inline-start: calc(var(--context-menu-background-padding) + var(--menu-padding) + var(--context-menu-background-padding-default) + 16px) !important; + padding-inline-start: calc(var(--context-menu-background-padding) + var(--context-menu-text-padding)) !important; + } + + /* Checkbox */ + :not(menu, #ContentSelectDropdown, #context-navigation) > menupopup > menuitem[type="checkbox"][checked="false"] > .menu-iconic-left { + padding-inline-start: var(--context-menu-text-padding); } } From 3bbbbe82f843a5352808c7f1af9d077af9b5bcee Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 25 Jun 2021 09:14:07 +0900 Subject: [PATCH 50/71] Fix: Installer - Bash3, Whitespace compatibility --- install.sh | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/install.sh b/install.sh index efd08a5..ede6f14 100755 --- a/install.sh +++ b/install.sh @@ -9,7 +9,7 @@ paths_filter() { local option="$2" # Set array - eval "local pathList=(\${${pathListName}[@]})" + eval "local pathList=(\"\${${pathListName}[@]}\")" # Set default option if [ -z "$option" ]; then @@ -25,7 +25,7 @@ paths_filter() { done # Replace - eval "${pathListName}=(\${foundedTargets[@]})" + eval "${pathListName}=(\"\${foundedTargets[@]}\")" } autocopy() { @@ -90,7 +90,7 @@ lepton_error_message() { lepton_ok_message() { local SIZE=50 local FILLED="" - for ((i=0; i<=$(("${SIZE}" - 2)); i++)); do + for ((i=0; i<=$((SIZE - 2)); i++)); do FILLED+="." done FILLED+="OK" @@ -99,7 +99,7 @@ lepton_ok_message() { echo "${message}${FILLED:${#message}}" } -#== Multiselct ================================================================= +#== Multiselect ================================================================ # https://stackoverflow.com/questions/45382472/bash-select-multiple-answers-at-once/54261882 multiselect() { echo 'Select with , Done with !!!' @@ -201,9 +201,9 @@ multiselect() { #** Profile ******************************************************************** #== Profile Dir ================================================================ firefoxProfileDirPaths=( - ~/.mozilla/firefox - ~/.var/app/org.mozilla.firefox/.mozilla/firefox - ~/Library/Application\ Support/Firefox/Profiles + "${HOME}/.mozilla/firefox" + "${HOME}/.var/app/org.mozilla.firefox/.mozilla/firefox" + "${HOME}/Library/Application Support/Firefox" ) check_profile_dir() { @@ -225,8 +225,6 @@ check_profile_dir() { #== Profile Info =============================================================== PROFILEINFOFILE="profiles.ini" check_profile_ini() { - local infoFile="profiles.ini" - for profileDir in "${firefoxProfileDirPaths[@]}"; do if [ ! -f "${profileDir}/${PROFILEINFOFILE}" ]; then lepton_error_message "Unable to find ${PROFILEINFOFILE} at ${profileDir}" @@ -241,6 +239,7 @@ firefoxProfilePaths=() select_profile() { local profileName="$1" + local IFS=$'\n' for profileDir in "${firefoxProfileDirPaths[@]}"; do local escapeDir=$(echo "${profileDir}" | sed "s|\/|\\\/|g") firefoxProfilePaths+=($( @@ -270,9 +269,13 @@ select_profile() { if [ "${foundCount}" -eq 1 ]; then lepton_ok_message "Auto detected profile" else - local targetPaths=() - local multiPaths=$(echo "${firefoxProfilePaths[@]}" | sed 's/ /;/g') + local multiPaths="" + for profilePath in "${firefoxProfilePaths[@]}"; do + multiPaths+="${profilePath};" + done multiselect profileSelected "${multiPaths}" + + local targetPaths=() for ((i=0; i<"${#profileSelected[@]}"; i++)); do local result="${profileSelected[${i}]}" if [ "$result" == "true" ]; then From f2507ed3fe79a94262052f1d0316636f09b74373 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 25 Jun 2021 10:54:47 +0900 Subject: [PATCH 51/71] Add: Installer - Git auto install --- install.sh | 73 ++++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 55 insertions(+), 18 deletions(-) diff --git a/install.sh b/install.sh index ede6f14..5fd8f06 100755 --- a/install.sh +++ b/install.sh @@ -1,6 +1,60 @@ #!/usr/bin/env bash #** Helper Utils *************************************************************** +#== Message ==================================================================== +lepton_error_message() { + >&2 echo "FAILED: ${@}" + exit 1 +} + +lepton_ok_message() { + local SIZE=50 + local FILLED="" + for ((i=0; i<=$((SIZE - 2)); i++)); do + FILLED+="." + done + FILLED+="OK" + + local message="${@}" + echo "${message}${FILLED:${#message}}" +} + +#== Required Tools ============================================================= +PACAPT_PATH="/usr/local/bin/pacapt" +PACAPT_INSTALLED=true +pacapt_install() { + if ! [ -x "$(command -v pacapt)" ]; then + echo "Universal Package Manager(icy/pacapt) Download && Install(need sudo permission)" + echo "It is installed temporarily and will be removed when installation is complete." + sudo curl https://github.com/icy/pacapt/raw/ng/pacapt -Lo "${PACAPT_PATH}" + sudo chmod 755 "${PACAPT_PATH}" + sudo ln -sv "${PACAPT_PATH}" /usr/local/bin/pacman || true + PACAPT_INSTALLED=false + fi + sudo pacapt -Sy +} + +pacapt_uninstall() { + if [[ "${PACAPT_INSTALLED}" == false ]]; then + sudo rm -rf "${PACAPT}" + fi +} + +git_check() { + if ! [ -x "$(command -v git)" ]; then + if [ "${OSTYPE}" == "linux-gnu" ] || [ "${OSTYPE}" == "FreeBSD" ]; then + pacapt_install + sudo pacapt -S git + pacapt_uninstall + elif [ "${OSTYPE}" == "darwin" ]; then + xcode-select --install + else + lepton_error_message "OS NOT DETECTED, couldn't install required packages" + fi + fi + lepton_ok_message "Required - git" +} + #== PATH / File ================================================================ currentDir=$( cd "$(dirname $0)" ; pwd ) @@ -81,24 +135,6 @@ autorestore() { fi } -#== Message ==================================================================== -lepton_error_message() { - >&2 echo "FAILED: ${@}" - exit 1 -} - -lepton_ok_message() { - local SIZE=50 - local FILLED="" - for ((i=0; i<=$((SIZE - 2)); i++)); do - FILLED+="." - done - FILLED+="OK" - - local message="${@}" - echo "${message}${FILLED:${#message}}" -} - #== Multiselect ================================================================ # https://stackoverflow.com/questions/45382472/bash-select-multiple-answers-at-once/54261882 multiselect() { @@ -373,6 +409,7 @@ install_network() { automv chrome chrome.bak fi + git_check git clone -b "${leptonBranch}" https://github.com/black7375/Firefox-UI-Fix.git chrome local isProfile="" From 6b77445698f8f92c3a779dcb6b83615b2496a417 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 25 Jun 2021 11:15:10 +0900 Subject: [PATCH 52/71] Fix: Installer - xcode-select wait installed --- install.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 5fd8f06..dda7ae3 100755 --- a/install.sh +++ b/install.sh @@ -47,7 +47,21 @@ git_check() { sudo pacapt -S git pacapt_uninstall elif [ "${OSTYPE}" == "darwin" ]; then - xcode-select --install + # https://unix.stackexchange.com/questions/408280/until-statement-waiting-for-process-to-finish-being-ignored + XCODE_MESSAGE="$(osascript -e 'tell app "System Events" to display dialog "Please click install when Command Line Developer Tools appears"')" + if [ "$XCODE_MESSAGE" = "button returned:OK" ]; then + xcode-select --install + else + echo "You have cancelled the installation, please rerun the installer." + # you have forgotten to exit here + exit + fi + + until [ "$(xcode-select -p 1>/dev/null 2>&1; echo $?)" -eq 0 ]; do + echo -n "." + sleep 1 + done + lepton_ok_message "Installed Command Line Developer Tools" else lepton_error_message "OS NOT DETECTED, couldn't install required packages" fi From eb68e82be2395976c1778bb9a306ad768e38b7c5 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 25 Jun 2021 12:04:37 +0900 Subject: [PATCH 53/71] Fix: Installer - Check clone verify --- install.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install.sh b/install.sh index dda7ae3..61d2d6d 100755 --- a/install.sh +++ b/install.sh @@ -425,6 +425,9 @@ install_network() { git_check git clone -b "${leptonBranch}" https://github.com/black7375/Firefox-UI-Fix.git chrome + if ! [ -d "chrome" ]; then + lepton_error_message "Unable to find downloaded files" + fi local isProfile="" for profilePath in "${firefoxProfilePaths}"; do From f27cc7d75956d078f5748b4db5091f79999d81e2 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 25 Jun 2021 13:21:14 +0900 Subject: [PATCH 54/71] Fix: Installer - Detect git at mac --- install.sh | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/install.sh b/install.sh index 61d2d6d..26d66d4 100755 --- a/install.sh +++ b/install.sh @@ -40,32 +40,42 @@ pacapt_uninstall() { fi } +mac_command_line_developer_tools() { + # https://unix.stackexchange.com/questions/408280/until-statement-waiting-for-process-to-finish-being-ignored + XCODE_MESSAGE="$(osascript -e 'tell app "System Events" to display dialog "Please click install when Command Line Developer Tools appears"')" + if [ "$XCODE_MESSAGE" = "button returned:OK" ]; then + xcode-select --install + else + echo "You have cancelled the installation, please rerun the installer." + # you have forgotten to exit here + exit + fi + + until [ "$(xcode-select -p 1>/dev/null 2>&1; echo $?)" -eq 0 ]; do + echo -n "." + sleep 1 + done + lepton_ok_message "Installed Command Line Developer Tools" +} + git_check() { if ! [ -x "$(command -v git)" ]; then if [ "${OSTYPE}" == "linux-gnu" ] || [ "${OSTYPE}" == "FreeBSD" ]; then pacapt_install sudo pacapt -S git pacapt_uninstall - elif [ "${OSTYPE}" == "darwin" ]; then - # https://unix.stackexchange.com/questions/408280/until-statement-waiting-for-process-to-finish-being-ignored - XCODE_MESSAGE="$(osascript -e 'tell app "System Events" to display dialog "Please click install when Command Line Developer Tools appears"')" - if [ "$XCODE_MESSAGE" = "button returned:OK" ]; then - xcode-select --install - else - echo "You have cancelled the installation, please rerun the installer." - # you have forgotten to exit here - exit - fi - - until [ "$(xcode-select -p 1>/dev/null 2>&1; echo $?)" -eq 0 ]; do - echo -n "." - sleep 1 - done - lepton_ok_message "Installed Command Line Developer Tools" + elif [[ "${OSTYPE}" == "darwin"* ]]; then + mac_command_line_developer_tools else lepton_error_message "OS NOT DETECTED, couldn't install required packages" fi fi + + if [[ "${OSTYPE}" == "darwin"* ]]; then + if ! [ "$(git --help 1>/dev/null 2>&1; echo $?)" -eq 0 ]; then + mac_command_line_developer_tools + fi + fi lepton_ok_message "Required - git" } From b278dd0bd535830e5a0a9f35e0b322b63c378055 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Fri, 25 Jun 2021 13:37:44 +0900 Subject: [PATCH 55/71] Add: Insaller - spinner --- install.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 26d66d4..b0abdc7 100755 --- a/install.sh +++ b/install.sh @@ -19,6 +19,15 @@ lepton_ok_message() { echo "${message}${FILLED:${#message}}" } +lepton_spinner() { + local chars="/-\|" + + for (( i=0; i<${#chars}; i++ )); do + sleep 0.5 + echo -en "${chars:$i:1}" "\r" + done +} + #== Required Tools ============================================================= PACAPT_PATH="/usr/local/bin/pacapt" PACAPT_INSTALLED=true @@ -46,15 +55,13 @@ mac_command_line_developer_tools() { if [ "$XCODE_MESSAGE" = "button returned:OK" ]; then xcode-select --install else - echo "You have cancelled the installation, please rerun the installer." - # you have forgotten to exit here - exit + lepton_error_message "You have cancelled the installation, please rerun the installer." fi until [ "$(xcode-select -p 1>/dev/null 2>&1; echo $?)" -eq 0 ]; do - echo -n "." - sleep 1 + lepton_spinner done + echo "" lepton_ok_message "Installed Command Line Developer Tools" } From 8ece1aead728c67c3e4a50e5029d2691d9a52e0d Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 26 Jun 2021 17:18:37 +0900 Subject: [PATCH 56/71] Clean: Installer - Profiles update separate --- install.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index b0abdc7..3873b0c 100755 --- a/install.sh +++ b/install.sh @@ -303,9 +303,7 @@ check_profile_ini() { #== Profile PATH =============================================================== firefoxProfilePaths=() -select_profile() { - local profileName="$1" - +update_profile_paths() { local IFS=$'\n' for profileDir in "${firefoxProfileDirPaths[@]}"; do local escapeDir=$(echo "${profileDir}" | sed "s|\/|\\\/|g") @@ -316,6 +314,17 @@ select_profile() { )) done + local foundCount="${#firefoxProfilePaths[@]}" + if [ "${foundCount}" -eq 0 ]; then + lepton_ok_message "Profile paths updated" + else + lepton_error_message "Doesn't exist profiles" + fi +} + +select_profile() { + local profileName="$1" + if [ "${profileName}" != "" ]; then local targetPath="" for profilePath in "${firefoxProfilePaths[@]}"; do @@ -525,6 +534,7 @@ install_lepton() { check_profile_dir "${profileDir}" check_profile_ini + update_profile_paths select_profile "${profileName}" install_profile From 9f40d6348cd21e301feb716830f1325e77d71d6e Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 26 Jun 2021 17:19:35 +0900 Subject: [PATCH 57/71] Add: Installer - lepton.ini creator --- install.sh | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/install.sh b/install.sh index 3873b0c..ba817af 100755 --- a/install.sh +++ b/install.sh @@ -510,6 +510,69 @@ install_profile() { # - Release(): force latest tag update # - Git: latest commit update +#== Create info file =========================================================== +# We should always create a new one, as it also takes into account the possibility of setting it manually. +# Updates happen infrequently, so the creation overhead is less significant. + +LEPTONINFOFILE="lepton.ini" +RELEASEINFOFILE="INFO" +write_lepton_info() { + # Init info + local output="" + local prevDir=$(dirname "${firefoxProfilePaths[0]}") + for profilePath in "${firefoxProfilePaths[@]}"; do + local LEPTONINFOPATH="${profilePath}/chrome/${RELEASEINFOFILE}" + local LEPTONGITPATH="{profilePath}/chrome/.git" + + # Profile info + local updateType="" + local installedVer="" + local installedBranch="" + if [ -f "${LEPTONINFOPATH}" ]; then + updateType="Release" + installedVer=$(grep -E "^Ver" "${LEPTONINFOPATH}" | + cut -f 2 -d"=") + installedBranch=$(grep -E "^Branch" "${LEPTONINFOPATH}" | + cut -f 2 -d"=") + elif [ -d "${LEPTONGITPATH}" ]; then + updateType="Git" + installedVer=$(git --git-dir "${profilePath}/chrome/.git" + rev-parse HEAD) + installedBranch=$(git --git-dir "${profilePath}/chrome/.git" + rev-parse --abbrev-ref HEAD) + else + updateType="Local" + installedVer="unknown" + fi + + # Flushing + local profileDir=$(dirname "${profilePath}") + local profileName=$(basename "${profilePath}") + if [ "${prevDir}" != "${profileDir}" ]; then + echo -e "${output}" | tee "${prevDir}/${LEPTONINFOFILE}" > /dev/null + output="" + fi + prevDir="${profileDir}" + + # Make output contents + if [ "${updateType}" == "Local" ]; then + output="${output}[${profileName}]\nType=${updateType}\nVer=${installedVer}\n\n" + else + output="${output}[${profileName}]\nType=${updateType}\nVer=${installedVer}\nBranch=${installedBranch}\n\n" + fi + + # Latest element flushing + if [ "${profilePath}" == "${latestPath}" ]; then + echo -e "${output}" | tee "${profileDir}/${LEPTONINFOFILE}" > /dev/null + fi + prevDir="${profileDir}" + done + + lepton_ok_message "Lepton info file created" +} + +#== Read info file =========================================================== + #** Main *********************************************************************** install_lepton() { local profileDir="" From 4e6b3107a2059b0a7f6cdd95aeb6c4f870d40548 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 26 Jun 2021 19:38:56 +0900 Subject: [PATCH 58/71] Fix: Installer - RFC update --- install.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/install.sh b/install.sh index ba817af..4632d51 100755 --- a/install.sh +++ b/install.sh @@ -490,19 +490,17 @@ install_profile() { #** Lepton Info File *********************************************************** #== Info File format & update policy =========================================== -## `LEPTON` file +## `LEPTON` file format # If this file exist in same directory as the `userChrome.css` file, # it is recognized as the "Lepton" installation directory. +# Branch=master | photon-style +# Ver= | | [NULL] ## `lepton.ini` file Format # [Profile PATH] # Type=Local | Release | Git -# Ver=unknown | | -# Branch=master | photon-style - -## Release's `INFO` file Format -# Ver= # Branch=master | photon-style +# Ver= | | [NULL] ## Update Policy # Type From 4d9eb169f74451ab4667fd380321ebf50ec18d08 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 26 Jun 2021 22:42:08 +0900 Subject: [PATCH 59/71] Add: Installer - INI file functions --- install.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/install.sh b/install.sh index 4632d51..2529cb3 100755 --- a/install.sh +++ b/install.sh @@ -166,6 +166,54 @@ autorestore() { fi } +#== INI File ================================================================ +get_ini_section() { + local filePath="$1" + echo $(grep -E "^\[" "${filePath}" |sed -e "s/^\[//g" -e "s/\]$//g") +} +get_ini_value() { + local filePath="$1" + local key="$2" + local section="$3" + + if [ "${section}" == "" ]; then + echo $(grep -E "^${key}" "${filePath}" | cut -f 2 -d"=") + else + local sectionStart="" + for line in $(cat "${filePath}"); do + if [[ "${sectionStart}" == "true" && "${line}" == "["* ]]; then + return 0 + fi + + if [ "${line}" == "[${section}]" ]; then + sectionStart="true" + fi + + if [ "${sectionStart}" == "true" ]; then + local output=$(echo "${line}" | grep -E "^${key}" | cut -f 2 -d"=" ) + if [ "${output}" != "" ]; then + echo "${output}" + fi + fi + done + fi +} + +set_ini_section() { + local section="$1" + echo "[${section}]\n" +} +set_ini_value() { + local key="$1" + local value="$2" + + if [ "${value}" == "" ]; then + echo "" + else + echo "${key}=${value}\n" + fi +} + #== Multiselect ================================================================ # https://stackoverflow.com/questions/45382472/bash-select-multiple-answers-at-once/54261882 multiselect() { From 5376de0f62cd16d8df7d153058981c325c1f1a80 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 26 Jun 2021 23:21:47 +0900 Subject: [PATCH 60/71] Clean: Installer - using ini file functions --- install.sh | 75 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/install.sh b/install.sh index 2529cb3..d61aad6 100755 --- a/install.sh +++ b/install.sh @@ -166,6 +166,12 @@ autorestore() { fi } +write_file() { + local filePath="$1" + local fileContent="$2" + echo -e "${fileContent}" | tee "${filePath}" > /dev/null +} + #== INI File ================================================================ get_ini_section() { local filePath="$1" @@ -176,8 +182,10 @@ get_ini_value() { local key="$2" local section="$3" + local output="" if [ "${section}" == "" ]; then - echo $(grep -E "^${key}" "${filePath}" | cut -f 2 -d"=") + output=$(grep -E "^${key}" "${filePath}" | cut -f 2 -d"=") + echo "${output}" else local sectionStart="" for line in $(cat "${filePath}"); do @@ -190,7 +198,7 @@ get_ini_value() { fi if [ "${sectionStart}" == "true" ]; then - local output=$(echo "${line}" | grep -E "^${key}" | cut -f 2 -d"=" ) + output=$(echo "${line}" | grep -E "^${key}" | cut -f 2 -d"=" ) if [ "${output}" != "" ]; then echo "${output}" fi @@ -356,14 +364,13 @@ update_profile_paths() { for profileDir in "${firefoxProfileDirPaths[@]}"; do local escapeDir=$(echo "${profileDir}" | sed "s|\/|\\\/|g") firefoxProfilePaths+=($( - grep -E "^Path" "${profileDir}/${PROFILEINFOFILE}" | - cut -f 2 -d"=" | + get_ini_value "${profileDir}/${PROFILEINFOFILE}" "Path" | sed "s/^/${escapeDir}\//" )) done local foundCount="${#firefoxProfilePaths[@]}" - if [ "${foundCount}" -eq 0 ]; then + if ! [ "${foundCount}" -eq 0 ]; then lepton_ok_message "Profile paths updated" else lepton_error_message "Doesn't exist profiles" @@ -561,59 +568,65 @@ install_profile() { # Updates happen infrequently, so the creation overhead is less significant. LEPTONINFOFILE="lepton.ini" -RELEASEINFOFILE="INFO" +CHROMEINFOFILE="LEPTON" write_lepton_info() { # Init info local output="" local prevDir=$(dirname "${firefoxProfilePaths[0]}") for profilePath in "${firefoxProfilePaths[@]}"; do - local LEPTONINFOPATH="${profilePath}/chrome/${RELEASEINFOFILE}" + local LEPTONINFOPATH="${profilePath}/chrome/${CHROMEINFOFILE}" local LEPTONGITPATH="{profilePath}/chrome/.git" # Profile info - local updateType="" - local installedVer="" - local installedBranch="" + local Type="" + local Ver="" + local Branch="" if [ -f "${LEPTONINFOPATH}" ]; then - updateType="Release" - installedVer=$(grep -E "^Ver" "${LEPTONINFOPATH}" | - cut -f 2 -d"=") - installedBranch=$(grep -E "^Branch" "${LEPTONINFOPATH}" | - cut -f 2 -d"=") - elif [ -d "${LEPTONGITPATH}" ]; then - updateType="Git" - installedVer=$(git --git-dir "${profilePath}/chrome/.git" - rev-parse HEAD) - installedBranch=$(git --git-dir "${profilePath}/chrome/.git" - rev-parse --abbrev-ref HEAD) - else - updateType="Local" - installedVer="unknown" + if [ -d "${LEPTONGITPATH}" ]; then + Type="Git" + Ver=$( git --git-dir "${LEPTONGITPATH}" rev-parse HEAD) + Branch=$(git --git-dir "${LEPTONGITPATH}" rev-parse --abbrev-ref HEAD) + else + Type=$( get_ini_value "${LEPTONINFOPATH}" "TYPE" ) + Ver=$( get_ini_value "${LEPTONINFOPATH}" "Ver" ) + Branch=$(get_ini_value "${LEPTONINFOPATH}" "Branch") + + if [ "${Type}" == "" ]; then + Type="Local" + fi + fi fi # Flushing local profileDir=$(dirname "${profilePath}") local profileName=$(basename "${profilePath}") if [ "${prevDir}" != "${profileDir}" ]; then - echo -e "${output}" | tee "${prevDir}/${LEPTONINFOFILE}" > /dev/null + write_file "${prevDir}/${LEPTONINFOFILE}" "${output}" output="" fi - prevDir="${profileDir}" # Make output contents - if [ "${updateType}" == "Local" ]; then - output="${output}[${profileName}]\nType=${updateType}\nVer=${installedVer}\n\n" - else - output="${output}[${profileName}]\nType=${updateType}\nVer=${installedVer}\nBranch=${installedBranch}\n\n" + if [ -f "${LEPTONINFOPATH}" ]; then + output="${output}$(set_ini_section ${profileName})" + for key in "Type" "Branch" "Ver"; do + eval "local value=\${${key}}" + output="${output}$(set_ini_value ${key} ${value})" + done fi # Latest element flushing if [ "${profilePath}" == "${latestPath}" ]; then - echo -e "${output}" | tee "${profileDir}/${LEPTONINFOFILE}" > /dev/null + write_file "${profileDir}/${LEPTONINFOFILE}" "${output}" fi prevDir="${profileDir}" done + # Verify + for profileDir in "${firefoxProfileDirPaths[@]}"; do + if ! [ -f "${profileDir}/${LEPTONINFOFILE}" ]; then + lepton_error_message "Lepton info file create" + fi + done lepton_ok_message "Lepton info file created" } From bad9321399b0715912de9cc96e05c3d08db2638c Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 26 Jun 2021 23:45:22 +0900 Subject: [PATCH 61/71] Add: Installer - `LEPTON` file --- .github/workflows/release.yml | 10 ++++++++++ LEPTON | 1 + 2 files changed, 11 insertions(+) create mode 100644 LEPTON diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f0c3a3..8d5270c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,6 +18,16 @@ jobs: with: ref: ${{ matrix.branch }} + - name: Info file Creation + run: | + rm -f LEPTON + + # or BRANCH=$(git rev-parse --abbrev-ref HEAD) + BRANCH=${{ matrix.branch }} + TAGVER=$(git describe --tags --abbrev=0) + + echo -e "Ver=${TAGVER}\nBranch=${BRANCH}" > LEPTON + - name: Release Structure run: | mkdir -v chrome diff --git a/LEPTON b/LEPTON new file mode 100644 index 0000000..1e76b9c --- /dev/null +++ b/LEPTON @@ -0,0 +1 @@ +Branch=master From c55db0fa2d99ed7846b5c69785406420bc647d90 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sat, 26 Jun 2021 23:46:39 +0900 Subject: [PATCH 62/71] Clean: Tab Bar - comment --- userChrome.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/userChrome.css b/userChrome.css index 4ed14ba..11381ef 100644 --- a/userChrome.css +++ b/userChrome.css @@ -149,6 +149,7 @@ } /** Tab Bar - Reduce Height, Show more contents *****************************/ + /* Toolbar Height */ :root:not([uidensity=touch]) #TabsToolbar { --toolbarbutton-inner-padding: 9px; /* Original: calc((var(--tab-min-height) - 16px) / 2) = 10px */ } @@ -163,6 +164,7 @@ max-height: unset; } + /* Scroll Button - Size Fix */ :root:not([uidensity=touch]) #tabbrowser-arrowscrollbox { --scrollbtn-vertical-padding: 3px; --scrollbtn-vertical-border: 2px; From 53106ec43c2b5739e82db69b5870214aea854d8c Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sun, 27 Jun 2021 02:24:30 +0900 Subject: [PATCH 63/71] Clean: Installer - Create `lepton.ini`, fix options --- install.sh | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/install.sh b/install.sh index d61aad6..bf74020 100755 --- a/install.sh +++ b/install.sh @@ -175,7 +175,9 @@ write_file() { #== INI File ================================================================ get_ini_section() { local filePath="$1" - echo $(grep -E "^\[" "${filePath}" |sed -e "s/^\[//g" -e "s/\]$//g") + + local ouput=$(grep -E "^\[" "${filePath}" |sed -e "s/^\[//g" -e "s/\]$//g") + echo "${ouput}" } get_ini_value() { local filePath="$1" @@ -418,9 +420,9 @@ select_profile() { foundCount="${#firefoxProfilePaths[@]}" if [ "${foundCount}" -eq 0 ]; then lepton_error_message "Please select profiles" - else - lepton_ok_message "Multi selected profiles" fi + + lepton_ok_message "Multi selected profiles" fi fi } @@ -563,11 +565,22 @@ install_profile() { # - Release(): force latest tag update # - Git: latest commit update +#== Lepton Info ================================================================ +LEPTONINFOFILE="lepton.ini" +check_lepton_ini() { + for profileDir in "${firefoxProfileDirPaths[@]}"; do + if [ ! -f "${profileDir}/${LEPTONINFOFILE}" ]; then + lepton_error_message "Unable to find ${LEPTONINFOFILE} at ${profileDir}" + fi + done + + lepton_ok_message "Lepton info file found" +} + #== Create info file =========================================================== # We should always create a new one, as it also takes into account the possibility of setting it manually. # Updates happen infrequently, so the creation overhead is less significant. -LEPTONINFOFILE="lepton.ini" CHROMEINFOFILE="LEPTON" write_lepton_info() { # Init info @@ -575,7 +588,7 @@ write_lepton_info() { local prevDir=$(dirname "${firefoxProfilePaths[0]}") for profilePath in "${firefoxProfilePaths[@]}"; do local LEPTONINFOPATH="${profilePath}/chrome/${CHROMEINFOFILE}" - local LEPTONGITPATH="{profilePath}/chrome/.git" + local LEPTONGITPATH="${profilePath}/chrome/.git" # Profile info local Type="" @@ -608,7 +621,8 @@ write_lepton_info() { # Make output contents if [ -f "${LEPTONINFOPATH}" ]; then output="${output}$(set_ini_section ${profileName})" - for key in "Type" "Branch" "Ver"; do + local Path="${profilePath}" + for key in "Type" "Branch" "Ver" "Path"; do eval "local value=\${${key}}" output="${output}$(set_ini_value ${key} ${value})" done @@ -622,29 +636,23 @@ write_lepton_info() { done # Verify - for profileDir in "${firefoxProfileDirPaths[@]}"; do - if ! [ -f "${profileDir}/${LEPTONINFOFILE}" ]; then - lepton_error_message "Lepton info file create" - fi - done + check_lepton_ini lepton_ok_message "Lepton info file created" } -#== Read info file =========================================================== - #** Main *********************************************************************** install_lepton() { local profileDir="" local profileName="" # Get options. - while getopts 'f:p:g:t:h' flag; do + while getopts 'f:p:h' flag; do case "${flag}" in f) profileDir="${OPTARG}" ;; p) profileName="${OPTARG}" ;; h) echo "Lepton Theme Install Script:" - echo " -f . Set custom Firefox folder path." + echo " -f . Set custom Firefox profile folder path." echo " -p . Set custom profile name." echo " -h to show this message." exit 0 @@ -660,6 +668,7 @@ install_lepton() { select_profile "${profileName}" install_profile + write_lepton_info } install_lepton "$@" From f44a974fc15b36e38674ea80b1110deb170cf403 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sun, 27 Jun 2021 16:46:04 +0900 Subject: [PATCH 64/71] Fix: Installer - Create `lepton.ini` --- install.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index bf74020..c389b44 100755 --- a/install.sh +++ b/install.sh @@ -169,7 +169,15 @@ autorestore() { write_file() { local filePath="$1" local fileContent="$2" - echo -e "${fileContent}" | tee "${filePath}" > /dev/null + + if [ -z "${fileContent}" ]; then + if [ -e "${filePath}" ]; then + rm -rf "${filePath}" + fi + touch "${filePath}" + else + echo -e "${fileContent}" | tee "${filePath}" > /dev/null + fi } #== INI File ================================================================ @@ -554,10 +562,11 @@ install_profile() { # Ver= | | [NULL] ## `lepton.ini` file Format -# [Profile PATH] +# [Profile Name] # Type=Local | Release | Git # Branch=master | photon-style # Ver= | | [NULL] +# Path= ## Update Policy # Type @@ -586,6 +595,7 @@ write_lepton_info() { # Init info local output="" local prevDir=$(dirname "${firefoxProfilePaths[0]}") + local latestPath="${firefoxProfilePaths[${#firefoxProfilePaths[@]} - 1]}" for profilePath in "${firefoxProfilePaths[@]}"; do local LEPTONINFOPATH="${profilePath}/chrome/${CHROMEINFOFILE}" local LEPTONGITPATH="${profilePath}/chrome/.git" @@ -594,6 +604,7 @@ write_lepton_info() { local Type="" local Ver="" local Branch="" + local Path="" if [ -f "${LEPTONINFOPATH}" ]; then if [ -d "${LEPTONGITPATH}" ]; then Type="Git" @@ -608,6 +619,8 @@ write_lepton_info() { Type="Local" fi fi + + Path="${profilePath}" fi # Flushing @@ -621,12 +634,11 @@ write_lepton_info() { # Make output contents if [ -f "${LEPTONINFOPATH}" ]; then output="${output}$(set_ini_section ${profileName})" - local Path="${profilePath}" - for key in "Type" "Branch" "Ver" "Path"; do - eval "local value=\${${key}}" - output="${output}$(set_ini_value ${key} ${value})" - done fi + for key in "Type" "Branch" "Ver" "Path"; do + eval "local value=\${${key}}" + output="${output}$(set_ini_value ${key} ${value})" + done # Latest element flushing if [ "${profilePath}" == "${latestPath}" ]; then From 15c3a3777e628d6bc9dc90e260cd33a086258c5f Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sun, 27 Jun 2021 20:25:41 +0900 Subject: [PATCH 65/71] Add: Installer - Update mode --- install.sh | 164 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 122 insertions(+), 42 deletions(-) diff --git a/install.sh b/install.sh index c389b44..7409f76 100755 --- a/install.sh +++ b/install.sh @@ -65,7 +65,7 @@ mac_command_line_developer_tools() { lepton_ok_message "Installed Command Line Developer Tools" } -git_check() { +check_git() { if ! [ -x "$(command -v git)" ]; then if [ "${OSTYPE}" == "linux-gnu" ] || [ "${OSTYPE}" == "FreeBSD" ]; then pacapt_install @@ -490,55 +490,78 @@ check_install_types() { fi } -#== Each Install =============================================================== -install_local() { - for profilePath in "${firefoxProfilePaths}"; do - autocopy user.js "${profilePath}/user.js" - autocopy "${currentDir}" "${profilePath}/chrome" - done - lepton_ok_message "End profile copy" -} - -install_release() { - for profilePath in "${firefoxProfilePaths}"; do - autocopy user.js "${profilePath}/user.js" - autocopy chrome "${profilePath}/chrome" - done - lepton_ok_message "End profile copy" -} - -install_network() { - local duplicate="" - if [ -e "chrome" ]; then - duplicate="true" +#== Install Helpers ============================================================ +chromeDuplicate="" +check_chrome_exist() { + if [ -e "chrome" ] && [ ! -f "chrome/${LEPTONINFOFILE}" ]; then + chromeDuplicate="true" automv chrome chrome.bak + lepton_ok_message "Backup files" + fi +} +check_chrome_restore() { + if [ "${chromeDuplicate}" == "true" ]; then + autorestore chrome + lepton_ok_message "End restore files" + fi + lepton_ok_message "End check restore files" +} + +clean_lepton() { + if [ ! "${chromeDuplicate}" == "true" ]; then + rm -rv chrome + fi + lepton_ok_message "End clean files" +} +clone_lepton() { + local branch="$1" + + if [ -z "${branch}" ]; then + branch="${leptonBranch}" fi - git_check - git clone -b "${leptonBranch}" https://github.com/black7375/Firefox-UI-Fix.git chrome + git clone -b "${branch}" https://github.com/black7375/Firefox-UI-Fix.git chrome if ! [ -d "chrome" ]; then lepton_error_message "Unable to find downloaded files" fi +} - local isProfile="" - for profilePath in "${firefoxProfilePaths}"; do - autocopy chrome/user.js "${profilePath}/user.js" - autocopy chrome "${profilePath}/chrome" +copy_lepton() { + local chromeDir="$1" + local userJSPath="$2" - if [ "${currentDir}" == "${profilePath}" ]; then - isProfile="true" - fi + if [ -z "${chromeDir}" ]; then + chromeDir="chrome" + fi + if [ -z "${userJSPath}" ]; then + userJSPath="${chromeDir}/user.js" + fi + + for profilePath in "${firefoxProfilePaths[@]}"; do + autocopy "${userJSPath}" "${profilePath}/user.js" + autocopy "${chromeDir}" "${profilePath}/chrome" done lepton_ok_message "End profile copy" +} - cd "${currentDir}" - if [ ! "${duplicate}" == "true" ]; then - rm -rv chrome - fi - if [ "${duplicate}" == "true" ]; then - autorestore chrome - fi - lepton_ok_message "End clean files" +#== Each Install =============================================================== +install_local() { + copy_lepton "${currentDir}" "user.js" +} + +install_release() { + copy_lepton "chrome" "user.js" +} + +install_network() { + check_chrome_exist + check_git + + clone_lepton + copy_lepton + + clean_lepton + check_chrome_restore } install_profile() { @@ -652,18 +675,65 @@ write_lepton_info() { lepton_ok_message "Lepton info file created" } +#** Update ********************************************************************* +update_profile() { + check_git + for profileDir in "${firefoxProfileDirPaths[@]}"; do + local LEPTONINFOPATH="${profileDir}/${LEPTONINFOFILE}" + local sections=$(get_ini_section "${LEPTONINFOPATH}") + if [ ! -z "${sections}" ]; then + for section in "${sections[@]}"; do + local Type=$( get_ini_value "${LEPTONINFOPATH}" "Type" "${section}") + local Branch=$(get_ini_value "${LEPTONINFOPATH}" "Branch" "${section}") + local Path=$( get_ini_value "${LEPTONINFOPATH}" "Path" "${section}") + + local LEPTONGITPATH="${Path}/chrome/.git" + if [ "${Type}" == "Git" ]; then + git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" + git --git-dir "${LEPTONGITPATH}" pull --no-edit + elif [ "${Type}" == "Local" ] || [ "${Type}" == "Release" ]; then + check_chrome_exist + if [ ! -d "chrome" ]; then + clone_lepton + fi + + firefoxProfilePaths=("${Path}") + copy_lepton + + if [ -z "${Branch}" ]; then + Branch="${leptonBranch}" + fi + git --git-dir "${LEPTONGITPATH}" checkout "${Branch}" + + if [ "${Type}" == "Release" ]; then + local Ver=$(git --git-dir "${LEPTONINFOFILE}" describe --tags --abbrev=0) + git --git-dir "${LEPTONGITPATH}" checkout "tags/${Ver}" + fi + else + lepton_error_message "Unable to find update type, ${Type}" + fi + done + fi + done + clean_lepton + check_chrome_restore +} + #** Main *********************************************************************** install_lepton() { + local updateMode="" local profileDir="" local profileName="" # Get options. - while getopts 'f:p:h' flag; do + while getopts 'u:f:p:h' flag; do case "${flag}" in + u) updateMode="true" ;; f) profileDir="${OPTARG}" ;; p) profileName="${OPTARG}" ;; h) echo "Lepton Theme Install Script:" + echo " -u run to update mode" echo " -f . Set custom Firefox profile folder path." echo " -p . Set custom profile name." echo " -h to show this message." @@ -677,10 +747,20 @@ install_lepton() { check_profile_dir "${profileDir}" check_profile_ini update_profile_paths - select_profile "${profileName}" - install_profile + # Install Mode + if [ ! "${updateMode}" == true ]; then + select_profile "${profileName}" + install_profile + fi + write_lepton_info + + # Update Mode + if [ ! "${updateMode}" == true ]; then + update_profile + write_lepton_info + fi } install_lepton "$@" From 271129013bdd22bd32f84a01837f2450f2dd7671 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Sun, 27 Jun 2021 20:27:45 +0900 Subject: [PATCH 66/71] Fix: Installer - Update feature --- install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 7409f76..afa661c 100755 --- a/install.sh +++ b/install.sh @@ -129,7 +129,7 @@ autocopy() { echo "" fi - cp -rv "${file}" "${target}" + cp -rf "${file}" "${target}" } automv() { @@ -148,7 +148,7 @@ automv() { echo "" fi - mv -v "${file}" "${target}" + mv -f "${file}" "${target}" } autorestore() { @@ -156,9 +156,9 @@ autorestore() { local target="${file}.bak" if [ -e "${file}" ]; then - rm -rv "${file}" + rm -rf "${file}" fi - mv -v "${target}" "${file}" + mv -f "${target}" "${file}" local lookupTarget="${target}.bak" if [ -e "${lookupTarget}" ]; then @@ -509,7 +509,7 @@ check_chrome_restore() { clean_lepton() { if [ ! "${chromeDuplicate}" == "true" ]; then - rm -rv chrome + rm -rf chrome fi lepton_ok_message "End clean files" } From 294575d2132b0a140b80b3b13dfb0d526e42b3ab Mon Sep 17 00:00:00 2001 From: BlaCk_Void Date: Sun, 27 Jun 2021 22:31:44 +0900 Subject: [PATCH 67/71] Add: Clipped Tab - show close button on hover #45 --- userChrome.css | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/userChrome.css b/userChrome.css index 11381ef..9a44b65 100644 --- a/userChrome.css +++ b/userChrome.css @@ -341,7 +341,11 @@ padding-inline-start: 8px !important; } - #tabbrowser-tabs[closebuttons=activetab] .tabbrowser-tab:not([visuallyselected]) .tab-close-button { + #tabbrowser-tabs[closebuttons="activetab"] > #tabbrowser-arrowscrollbox > .tabbrowser-tab > .tab-stack > .tab-content > .tab-close-button:not([selected="true"]) { + display: -moz-inline-box !important; + } + + #tabbrowser-tabs[closebuttons=activetab] .tabbrowser-tab:not([visuallyselected], :hover) .tab-close-button { visibility: collapse !important; } From 7b521251083cd4280fe8698d1251e0373ed72206 Mon Sep 17 00:00:00 2001 From: BlaCk_Void Date: Sun, 27 Jun 2021 22:32:14 +0900 Subject: [PATCH 68/71] Fix: Panel - Download button vertical align --- userChrome.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/userChrome.css b/userChrome.css index 9a44b65..ce70f13 100644 --- a/userChrome.css +++ b/userChrome.css @@ -898,6 +898,9 @@ #downloadsHistory { list-style-image: url(chrome://browser/skin/downloads/downloads.svg); } + #downloadsHistory .box-inherit.button-box { + display: -moz-inline-box !important; + } /*= Toolbar - Overflow Menu ================================================*/ #overflowMenu-customize-button { From be9ac5fd985b9a8d976d45119fe88e25412bad32 Mon Sep 17 00:00:00 2001 From: BlaCk_Void Date: Sun, 27 Jun 2021 22:45:35 +0900 Subject: [PATCH 69/71] Fix: Clipped Tabs - Show close button exclude pinned #45 --- userChrome.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/userChrome.css b/userChrome.css index ce70f13..bc768e4 100644 --- a/userChrome.css +++ b/userChrome.css @@ -341,7 +341,7 @@ padding-inline-start: 8px !important; } - #tabbrowser-tabs[closebuttons="activetab"] > #tabbrowser-arrowscrollbox > .tabbrowser-tab > .tab-stack > .tab-content > .tab-close-button:not([selected="true"]) { + #tabbrowser-tabs[closebuttons="activetab"] > #tabbrowser-arrowscrollbox > .tabbrowser-tab:not([pinned]) > .tab-stack > .tab-content > .tab-close-button:not([selected="true"]) { display: -moz-inline-box !important; } From 32bafa7a38e03e4f20bec3fd71c354196e326a48 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Mon, 28 Jun 2021 09:27:31 +0900 Subject: [PATCH 70/71] Fix: Theme - Navbar top outline color #99 --- userChrome.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/userChrome.css b/userChrome.css index bc768e4..eae1e00 100644 --- a/userChrome.css +++ b/userChrome.css @@ -18,6 +18,11 @@ background-color: unset !important; /* Original: var(--lwt-accent-color) */ } + /* Navbar Border */ + #navigator-toolbox:-moz-lwtheme { + --tabs-border-color: rgba(0,0,0,.3); + } + /** Windows 7 - Compatibility ***********************************************/ @media (-moz-os-version: windows-win7) { /* Header Color */ From b4bef6adba113253a23e416cd1429513c30b9c29 Mon Sep 17 00:00:00 2001 From: alstjr7375 Date: Tue, 29 Jun 2021 09:41:46 +0900 Subject: [PATCH 71/71] Doc: CREDITS update --- CREDITS | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CREDITS b/CREDITS index b9a608b..bd5eea3 100644 --- a/CREDITS +++ b/CREDITS @@ -1,9 +1,9 @@ This is at least a partial credits-file of people that have contributed to the 'Firefox-UI-Fix' project. It is sorted by name. - The fields are: name (N), email (E), web-address(W), license(L). + The fields are: name (N), email (E), web-address(W), license(L). Thanks, - black7375 + black7375 ---------- Reference Projects & Resources @@ -22,6 +22,10 @@ N: firefox-csshacks W: https://github.com/MrOtherGuy/firefox-csshacks L: MPL 2.0 +N: Fluent UI System Icons +W: https://github.com/microsoft/fluentui-system-icons +L: MIT + N: gecko-dev W: https://hg.mozilla.org/ L: MPL 2.0 @@ -87,6 +91,9 @@ W: https://github.com/Nyubis N: SanderTheDragon E: sanderthedragon@zoho.com +N: Sylvain +E: B00ze64@hotmail.com + N: Yunsup Sim E: pedogunu@gmail.com W: https://ethansup.net