diff options
author | Rafał Babiarz <5783815+Sauler@users.noreply.github.com> | 2022-03-01 17:11:03 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-02 18:11:17 +0100 |
commit | 6bf59cbb1bf01924bc465663902154e0b90a45da (patch) | |
tree | bf09a7c0dfdfaea587d3223d3ddfd37175de4be5 /Userland/Applications/Browser | |
parent | c2e2a964f2462394c32fbd5d7447da328208830b (diff) | |
download | serenity-6bf59cbb1bf01924bc465663902154e0b90a45da.zip |
Browser: Add storage inspector to context menu
Diffstat (limited to 'Userland/Applications/Browser')
-rw-r--r-- | Userland/Applications/Browser/BrowserWindow.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Applications/Browser/BrowserWindow.cpp b/Userland/Applications/Browser/BrowserWindow.cpp index c539474003..e6745fe39e 100644 --- a/Userland/Applications/Browser/BrowserWindow.cpp +++ b/Userland/Applications/Browser/BrowserWindow.cpp @@ -228,6 +228,14 @@ void BrowserWindow::build_menus() js_console_action->set_status_tip("Open JavaScript console for this page"); inspect_menu.add_action(js_console_action); + auto storage_window_action = GUI::Action::create( + "Open S&torage Inspector", g_icon_bag.cookie, [this](auto&) { + active_tab().show_storage_inspector(); + }, + this); + storage_window_action->set_status_tip("Show Storage inspector for this page"); + inspect_menu.add_action(storage_window_action); + auto& settings_menu = add_menu("&Settings"); m_change_homepage_action = GUI::Action::create( @@ -526,6 +534,10 @@ void BrowserWindow::create_new_tab(URL url, bool activate) m_cookie_jar.dump_cookies(); }; + new_tab.on_want_cookies = [this]() { + return m_cookie_jar.get_all_cookies(); + }; + new_tab.load(url); dbgln_if(SPAM_DEBUG, "Added new tab {:p}, loading {}", &new_tab, url); |