aboutsummaryrefslogtreecommitdiff
path: root/intimate/index.js
diff options
context:
space:
mode:
authorStarscouts <starscouts@equestria.dev>2024-07-14 14:28:01 +0200
committerStarscouts <starscouts@equestria.dev>2024-07-14 14:28:01 +0200
commit361fe53a7e8a48e42ac8d7f4c07f33bf4ed178e2 (patch)
treef559784cd9a076c27fa6cd904641176efec89a6a /intimate/index.js
parent1bbe60d3a237cfe99dc6d1a3aa14de542668dc6f (diff)
downloadfaunerie-361fe53a7e8a48e42ac8d7f4c07f33bf4ed178e2.tar.gz
faunerie-361fe53a7e8a48e42ac8d7f4c07f33bf4ed178e2.tar.bz2
faunerie-361fe53a7e8a48e42ac8d7f4c07f33bf4ed178e2.zip
Fixes for WindowsHEADmane
Diffstat (limited to 'intimate/index.js')
-rw-r--r--[-rwxr-xr-x]intimate/index.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/intimate/index.js b/intimate/index.js
index 620398c..be295e3 100755..100644
--- a/intimate/index.js
+++ b/intimate/index.js
@@ -22,6 +22,10 @@ function createWindow () {
fullscreenable: false,
simpleFullscreen: true,
titleBarStyle: "hidden",
+ titleBarOverlay: {
+ color: "#21252977",
+ symbolColor: "#ffffff"
+ },
backgroundColor: "#212529",
autoHideMenuBar: true,
webPreferences: {
@@ -98,9 +102,11 @@ Menu.setApplicationMenu(menu);
app.whenReady().then(() => {
protocol.handle('pbip', async (req) => {
- const { pathname, searchParams } = new URL(req.url);
+ let { pathname, searchParams } = new URL(req.url);
let mime = searchParams.get("mime") ?? "application/octet-stream";
+ if (process.platform === "win32") pathname = pathname.substring(1);
+
const inflateRawSync = util.promisify(zlib.inflateRaw);
try {
@@ -140,11 +146,6 @@ app.on('window-all-closed', () => {
app.quit();
});
-app.on('before-quit', () => {
- try { if (mainWindow) mainWindow.close(); } catch (e) { console.error(e); }
- try { if (mainWindow) fullscreenWindow.close(); } catch (e) { console.error(e); }
-});
-
ipcMain.on('start', (_, prefs, config) => {
preferences = prefs;
globalConfig = config;
@@ -158,6 +159,7 @@ ipcMain.on('start', (_, prefs, config) => {
resizable: false,
maximizable: false,
minimizable: false,
+ autoHideMenuBar: true,
webPreferences: {
nodeIntegration: true,
contextIsolation: false