From 8712f9ecb6e55e8b1e7070b564e8ce2c906ada43 Mon Sep 17 00:00:00 2001 From: kaoansi-biwa Date: Tue, 19 Dec 2023 21:34:06 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=87=E3=83=95=E3=82=A9=E3=83=AB=E3=83=88?= =?UTF-8?q?=E5=80=A4=E6=8C=87=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- browser/components/newtab/lib/PrefsFeed.jsm | 2 +- browser/components/preferences/home.js | 3 ++- floorp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/browser/components/newtab/lib/PrefsFeed.jsm b/browser/components/newtab/lib/PrefsFeed.jsm index faf9f628eb707..c9825244df26f 100644 --- a/browser/components/newtab/lib/PrefsFeed.jsm +++ b/browser/components/newtab/lib/PrefsFeed.jsm @@ -273,7 +273,7 @@ class PrefsFeed { } }else if(Services.prefs.getIntPref("browser.newtabpage.activity-stream.floorp.background.type") == 4){ - const tmpPath = Services.prefs.getStringPref("browser.newtabpage.activity-stream.floorp.background.image.path") + const tmpPath = Services.prefs.getStringPref("browser.newtabpage.activity-stream.floorp.background.image.path") || PathUtils.join(Services.dirsvc.get("ProfD", Ci.nsIFile).path, "newtabImages","wallpaper.png") const fetchPath = Services.io.newFileURI(FileUtils.File(tmpPath)).asciiSpec if(tmpPath != this.oneImageData.url){ this.oneImageData = {"url":tmpPath,data:"","extension":"",notExist:false} diff --git a/browser/components/preferences/home.js b/browser/components/preferences/home.js index 8a313056f23ee..174b25668b0cd 100644 --- a/browser/components/preferences/home.js +++ b/browser/components/preferences/home.js @@ -822,7 +822,8 @@ var gHomePane = { }, imagePathInputSet(){ - let folderPath = Services.prefs.getStringPref("browser.newtabpage.activity-stream.floorp.background.image.path","") + let folderPath = Services.prefs.getStringPref("browser.newtabpage.activity-stream.floorp.background.image.path") || PathUtils.join(Services.dirsvc.get("ProfD", Ci.nsIFile).path, "newtabImages","wallpaper.png") + console.log(folderPath) document.querySelector("#picturePath").value = folderPath document.querySelector("#picturePath").style.backgroundImage = `url(moz-icon://${Services.io.newFileURI(FileUtils.File(folderPath)).asciiSpec})` } diff --git a/floorp b/floorp index eee201a15cbbc..23969e4e81b56 160000 --- a/floorp +++ b/floorp @@ -1 +1 @@ -Subproject commit eee201a15cbbc867439983470f41b181886e159d +Subproject commit 23969e4e81b569f39b5a0e277c60fcfb4e4c4ce0