Opera's other sidebar rule. A click in the active tab's page now hides the left panel (web app or add-on panel), so a chat opened for a quick look gets out of the way on its own. A pin button in the strip, shown while a panel is open, keeps that app open instead; pins are per app and survive restarts (settings.leftPanelPinned). The click is reported by home-preload, which every web tab already runs; main ignores it unless a panel is open and the click came from the active tab.
9 lines
503 B
JavaScript
9 lines
503 B
JavaScript
const { contextBridge, ipcRenderer } = require("electron");
|
|
contextBridge.exposeInMainWorld("quicklinks", {
|
|
getState: () => ipcRenderer.invoke("quicklinks-get-state"),
|
|
open: (id) => ipcRenderer.invoke("quicklinks-open", String(id || "")),
|
|
close: () => ipcRenderer.invoke("quicklinks-close"),
|
|
pin: (on) => ipcRenderer.invoke("quicklinks-pin", !!on),
|
|
add: () => ipcRenderer.invoke("quicklinks-add"),
|
|
onState: (cb) => ipcRenderer.on("quicklinks-state", (_e, d) => cb(d)),
|
|
});
|