mirror of
https://github.com/ION606/browser-chromium.git
synced 2026-05-14 22:26:56 +00:00
initial commit/backup
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
// save the original window.open function
|
||||
const originalWindowOpen = window.open;
|
||||
|
||||
// override the window.open function
|
||||
window.open = function (url, target, features) {
|
||||
console.log('A new window is attempting to open:');
|
||||
console.log('URL:', url);
|
||||
console.log('Target:', target);
|
||||
console.log('Features:', features);
|
||||
|
||||
window.electronAPI.checkperms(window.location.hostname);
|
||||
|
||||
// call the original window.open function if you want the popup to proceed
|
||||
return originalWindowOpen.call(window, url, target, features);
|
||||
};
|
||||
Reference in New Issue
Block a user