mirror of
https://github.com/black7375/Firefox-UI-Fix.git
synced 2025-12-06 02:30:54 -08:00
Fix: Install - Non local custom files
This commit is contained in:
parent
7846695685
commit
8ab9ffff69
2 changed files with 10 additions and 8 deletions
|
|
@ -642,16 +642,17 @@ $customFiles = @(
|
|||
"userChrome-overrides.css",
|
||||
"userContent-overrides.css"
|
||||
)
|
||||
$localCustomFiles = $customFiles.Clone()
|
||||
|
||||
$customFileExist = $false
|
||||
function Check-CustomFiles() {
|
||||
$global:customFiles = Filter-Path $customFiles
|
||||
$global:localCustomFiles = Filter-Path $localCustomFiles
|
||||
|
||||
if ( $global:customFiles.Length -gt 0 ) {
|
||||
if ( $global:localCustomFiles.Length -gt 0 ) {
|
||||
$global:customFileExist = $true
|
||||
Lepton-OKMessage "Check custom file detected"
|
||||
|
||||
foreach ( $customFile in $global:customFiles ) {
|
||||
foreach ( $customFile in $global:localCustomFiles ) {
|
||||
Write-Host "- ${customFile}"
|
||||
}
|
||||
}
|
||||
|
|
@ -662,7 +663,7 @@ function Copy-CustomFiles() {
|
|||
# If Release or Network mode, Local is passed (Already copied)
|
||||
if ( "${leptonInstallType}" -ne "Local" ) {
|
||||
foreach ( $profilePath in $global:firefoxProfilePaths ) {
|
||||
foreach ( $customFile in $global:customFiles ) {
|
||||
foreach ( $customFile in $global:localCustomFiles ) {
|
||||
if ( "${customFile}" -eq "user-overrides.js" ) {
|
||||
Copy-Auto "${customFile}" "${profilePath}\${customFile}"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -622,16 +622,17 @@ customFiles=(
|
|||
userChrome-overrides.css
|
||||
userContent-overrides.css
|
||||
)
|
||||
localCustomFiles=("${customFiles[@]}")
|
||||
|
||||
customFileExist=""
|
||||
check_custom_files() {
|
||||
paths_filter customFiles
|
||||
paths_filter localCustomFiles
|
||||
|
||||
if [ "${#customFiles[@]}" -gt 0 ]; then
|
||||
if [ "${#localCustomFiles[@]}" -gt 0 ]; then
|
||||
customFileExist="true"
|
||||
lepton_ok_message "Check custom file detected"
|
||||
|
||||
for customFile in "${customFiles[@]}"; do
|
||||
for customFile in "${localCustomFiles[@]}"; do
|
||||
echo "- ${customFile}"
|
||||
done
|
||||
fi
|
||||
|
|
@ -642,7 +643,7 @@ copy_custom_files() {
|
|||
# If Release or Network mode, Local is passed (Already copied)
|
||||
if [ "${leptonInstallType}" != "Local" ]; then
|
||||
for profilePath in "${firefoxProfilePaths[@]}"; do
|
||||
for customFile in "${customFiles[@]}"; do
|
||||
for customFile in "${localCustomFiles[@]}"; do
|
||||
if [ "${customFile}" == "user-overrides.js" ]; then
|
||||
autocp "${customFile}" "${profilePath}/${customFile}"
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue