added permissions for website

This commit is contained in:
2024-11-04 11:55:14 -05:00
parent 5c845ffe61
commit 014e4c8b7b
19 changed files with 507 additions and 71 deletions
+3 -2
View File
@@ -71,7 +71,8 @@ contextBridge.exposeInMainWorld('electronAPI', {
onReceive: (channel, func) => {
ipcRenderer.on(channel, (event, ...args) => func(...args));
},
checkperms: (sitehostname) => ipcRenderer.send('get-site-perms', sitehostname)
checkperms: (sitehostname) => ipcRenderer.send('get-site-perms', sitehostname),
promptperms: () => ipcRenderer.send('prompt-terms', window.location.hostname)
});
// ipcRenderer.on('tab-opened', (ev, id) => {
@@ -87,7 +88,7 @@ contextBridge.exposeInMainWorld('tabAPI', {
addTab: (url) => ipcRenderer.send('add-tab', url || 'about:blank')
});
const load = () => {
const load = async () => {
console.info("PRELOAD LOADED!");
if (window.location.origin === 'lite.duckduckgo.com') {