diff options
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch')
| -rw-r--r-- | www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch deleted file mode 100644 index c46ec2b..0000000 --- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-beforeunload.patch +++ /dev/null | |||
| @@ -1,33 +0,0 @@ | |||
| 1 | # Add --disable-beforeunload to always disable beforeunload JavaScript dialogs | ||
| 2 | |||
| 3 | --- chrome/browser/ungoogled_flag_entries.h.orig | ||
| 4 | +++ chrome/browser/ungoogled_flag_entries.h | ||
| 5 | @@ -20,4 +20,8 @@ | ||
| 6 | "Disable search engine collection", | ||
| 7 | "Prevents search engines from being added automatically. ungoogled-chromium flag.", | ||
| 8 | kOsAll, SINGLE_VALUE_TYPE("disable-search-engine-collection")}, | ||
| 9 | + {"disable-beforeunload", | ||
| 10 | + "Disable beforeunload", | ||
| 11 | + "Disables JavaScript dialog boxes triggered by beforeunload. ungoogled-chromium flag.", | ||
| 12 | + kOsAll, SINGLE_VALUE_TYPE("disable-beforeunload")}, | ||
| 13 | #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_ | ||
| 14 | --- components/javascript_dialogs/app_modal_dialog_manager.cc.orig | ||
| 15 | +++ components/javascript_dialogs/app_modal_dialog_manager.cc | ||
| 16 | @@ -8,6 +8,7 @@ | ||
| 17 | #include <utility> | ||
| 18 | |||
| 19 | #include "base/bind.h" | ||
| 20 | +#include "base/command_line.h" | ||
| 21 | #include "base/i18n/rtl.h" | ||
| 22 | #include "base/macros.h" | ||
| 23 | #include "base/metrics/histogram_macros.h" | ||
| 24 | @@ -196,7 +197,8 @@ void AppModalDialogManager::RunBeforeUnl | ||
| 25 | ChromeJavaScriptDialogExtraData* extra_data = | ||
| 26 | &javascript_dialog_extra_data_[web_contents]; | ||
| 27 | |||
| 28 | - if (extra_data->suppress_javascript_messages_) { | ||
| 29 | + if (extra_data->suppress_javascript_messages_ | ||
| 30 | + || base::CommandLine::ForCurrentProcess()->HasSwitch("disable-beforeunload")) { | ||
| 31 | // If a site harassed the user enough for them to put it on mute, then it | ||
| 32 | // lost its privilege to deny unloading. | ||
| 33 | std::move(callback).Run(true, std::u16string()); | ||
