I was doing some troubleshooting and wanted to disable the “beforeunload” event listeners on a page. This is how I accomplished it with the Chrome browser.
Chrome
Chrome Prevent Know Your Location Popup
The Allow / Block popup in Google Chrome is an all too familiar sight when browsing the web, however this can be prevented. We can change the setting to automatically Block all location requests (they will not be able to see your location) without seeing the popup.
Hide PDF Toolbar in Google Chrome
The PDF Toolbar that comes up in Google Chrome when displaying a PDF can be suppressed by modifying the URL.