{"id":1302,"date":"2026-09-23T18:09:47","date_gmt":"2026-09-23T16:09:47","guid":{"rendered":"https:\/\/haizytiles.reinerstilesets.de\/?page_id=1302"},"modified":"2026-09-23T20:15:48","modified_gmt":"2026-09-23T18:15:48","slug":"skip-beforeunload","status":"publish","type":"page","link":"https:\/\/haizytiles.reinerstilesets.de\/index.php\/skip-beforeunload\/","title":{"rendered":"Skip Beforeunload"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"1302\" class=\"elementor elementor-1302\">\n\t\t\t\t<div class=\"elementor-element elementor-element-e5b745f e-flex e-con-boxed e-con e-parent\" data-id=\"e5b745f\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-8e8d326 e-con-full e-flex e-con e-child\" data-id=\"8e8d326\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a84de42 elementor-widget elementor-widget-image\" data-id=\"a84de42\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/skipbeforeunload.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"skipbeforeunload\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MTI4NCwidXJsIjoiaHR0cHM6XC9cL2hhaXp5dGlsZXMucmVpbmVyc3RpbGVzZXRzLmRlXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDI2XC8wOVwvc2tpcGJlZm9yZXVubG9hZC5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"861\" height=\"339\" src=\"https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/skipbeforeunload.png\" class=\"attachment-full size-full wp-image-1284\" alt=\"\" srcset=\"https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/skipbeforeunload.png 861w, https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/skipbeforeunload-300x118.png 300w, https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/skipbeforeunload-768x302.png 768w\" sizes=\"(max-width: 861px) 100vw, 861px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-b81adf8 e-con-full e-flex e-con e-child\" data-id=\"b81adf8\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2afdc0c elementor-widget elementor-widget-text-editor\" data-id=\"2afdc0c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Skip Beforeunload is a browser extension. It stops websites from preventing Chromium-based browsers from closing with \u201cLeave site?\u201d confirmation dialogs.<\/p><p>The project is open source under MIT license, and can be found at Github<\/p><p><a href=\"https:\/\/github.com\/ReinerBforartists\/skip-beforeunload\">https:\/\/github.com\/ReinerBforartists\/skip-beforeunload<\/a><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-784c458 e-con-full e-flex e-con e-parent\" data-id=\"784c458\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4605359 elementor-widget elementor-widget-text-editor\" data-id=\"4605359\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h4><b><code>\u00a0\u21e9 <\/code><\/b>Download<\/h4><p><!-- \/wp:paragraph --><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-8c64fab e-con-full e-flex e-con e-child\" data-id=\"8c64fab\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t<div class=\"elementor-element elementor-element-5c18287 e-con-full e-flex e-con e-child\" data-id=\"5c18287\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-b0efd97 elementor-widget elementor-widget-text-editor\" data-id=\"b0efd97\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>23.09.2026 &#8211; Version 1.0.0 &#8211; 7kb<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-381c2c1 e-con-full e-flex e-con e-child\" data-id=\"381c2c1\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-dbd6370 elementor-align-justify elementor-widget elementor-widget-button\" data-id=\"dbd6370\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"button.default\">\n\t\t\t\t\t\t\t\t\t\t<a class=\"elementor-button elementor-button-link elementor-size-sm\" href=\"https:\/\/haizytiles.reinerstilesets.de\/apps\/skip-beforeunload.zip\">\n\t\t\t\t\t\t<span class=\"elementor-button-content-wrapper\">\n\t\t\t\t\t\t\t\t\t<span class=\"elementor-button-text\">Download<\/span>\n\t\t\t\t\t<\/span>\n\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f0c8e4b e-flex e-con-boxed e-con e-parent\" data-id=\"f0c8e4b\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ceff62a elementor-widget elementor-widget-text-editor\" data-id=\"ceff62a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<h4>\u00a0<strong>The Problem<\/strong><\/h4><p>When i tried to close my browser, then there was always one page blocking the close. Youtube music with its &#8220;do you really want to leave page&#8221; nagscreen. And so the browser stayed open until i explicitely clicked away this dialog.<\/p><p><br \/><img decoding=\"async\" class=\"alignnone wp-image-1297 size-full\" src=\"https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/leave.png\" alt=\"\" width=\"580\" height=\"185\" srcset=\"https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/leave.png 580w, https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/leave-300x96.png 300w\" sizes=\"(max-width: 580px) 100vw, 580px\" \/><\/p><h4><strong>The Solution<\/strong><\/h4><p>Skip Beforeunload simply skips this dialog and immediately closes the browser instead. As it should.<\/p><p><strong>Installation (Chrome, Edge, Brave, Vivaldi, Opera \u2014 Chromium \u2265 111)<\/strong><br \/>This extension is installed as an unpacked extension (developer mode):<\/p><p>Clone this repository or download it as a zip and extract it.<br \/>Open the extensions page: chrome:\/\/extensions (Edge: edge:\/\/extensions, Opera: opera:\/\/extensions).<br \/>Chrome and Edge only: enable Developer mode first (top right). Opera offers the option without it.<br \/>Click Load unpacked extension and select the skip-beforeunload folder (the one that directly contains manifest.json).<br \/>That&#8217;s it. No browser restart needed; for tabs that were already open, a single reload (F5) is enough for the script to be injected.<\/p><p><img decoding=\"async\" class=\"alignnone wp-image-1280 size-full\" src=\"https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/load.png\" alt=\"\" width=\"1925\" height=\"763\" srcset=\"https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/load.png 1925w, https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/load-300x119.png 300w, https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/load-767x304.png 767w, https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/load-1536x609.png 1536w, https:\/\/haizytiles.reinerstilesets.de\/wp-content\/uploads\/2026\/09\/load-1024x406.png 1024w\" sizes=\"(max-width: 1925px) 100vw, 1925px\" \/><\/p><p>Note: Chromium browsers do not allow installing local .crx files directly (store-only policy), so &#8220;load unpacked&#8221; is the supported way to use this extension.<\/p><p><strong>How it works<\/strong><br \/>The content script runs with world: &#8220;MAIN&#8221; and run_at: &#8220;document_start&#8221; \u2014 i.e. in the page&#8217;s own JavaScript context and before any page script runs. This needs no service worker and no permissions, only Chromium \u2265 111 (when world: MAIN was introduced).<br \/>Important: Chrome shows the leave prompt as soon as any beforeunload\/ unload listener exists on the document. The extension therefore registers none of its own and blocks every registration attempt by the page:<br \/>EventTarget.prototype.addEventListener\/removeEventListener: calls with this === window and type beforeunload\/unload are swallowed \u2014 catches all call paths (window.addEventListener, bare addEventListener, .call(window, \u2026)).<br \/>window.addEventListener\/removeEventListener: additionally secured as own properties (e.g. in case a page restores the prototype).<br \/>window.onbeforeunload \/ window.onunload: accessor properties that swallow assignments and return null; configurable: false prevents restoration via Object.defineProperty.<br \/>The script is idempotent (flag on window); double injection is harmless.<\/p><p><strong>Limitations<\/strong><br \/>All beforeunload handlers are suppressed \u2014 including legitimate &#8220;unsaved changes&#8221; warnings. Sites that do cleanup or fire beacons in beforeunload no longer get the chance; the correct hook for that is pagehide, which is not touched.<br \/>Chrome has been deprecating the unload event since 2026 (bfcache project), but not beforeunload \u2014 the dialog mechanism stays, so this extension remains useful.<br \/>Chromium only (Firefox\/Safari are not covered; MV3 world: MAIN).<\/p><p><strong>Privacy<\/strong><br \/>The extension collects, sends, and stores no data. No tracking, no telemetry, no permissions beyond the declared content script.<\/p><p>The addon is open source under MIT license.<\/p><p><strong>Devlog<\/strong><\/p><p>23.09.2026 &#8211; Version 1.0.0<br \/>Initial release.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Skip Beforeunload is a browser extension. It stops websites from preventing Chromium-based browsers from closing with \u201cLeave site?\u201d confirmation dialogs. The project is open source under MIT license, and can be found at Github https:\/\/github.com\/ReinerBforartists\/skip-beforeunload \u00a0\u21e9 Download 23.09.2026 &#8211; Version 1.0.0 &#8211; 7kb Download \u00a0The Problem When i tried to close my browser, then there [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1302","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/haizytiles.reinerstilesets.de\/index.php\/wp-json\/wp\/v2\/pages\/1302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haizytiles.reinerstilesets.de\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/haizytiles.reinerstilesets.de\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/haizytiles.reinerstilesets.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haizytiles.reinerstilesets.de\/index.php\/wp-json\/wp\/v2\/comments?post=1302"}],"version-history":[{"count":0,"href":"https:\/\/haizytiles.reinerstilesets.de\/index.php\/wp-json\/wp\/v2\/pages\/1302\/revisions"}],"wp:attachment":[{"href":"https:\/\/haizytiles.reinerstilesets.de\/index.php\/wp-json\/wp\/v2\/media?parent=1302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}