mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
Browser: Add storage inspector to context menu
This commit is contained in:
parent
c2e2a964f2
commit
6bf59cbb1b
1 changed files with 12 additions and 0 deletions
|
@ -228,6 +228,14 @@ void BrowserWindow::build_menus()
|
||||||
js_console_action->set_status_tip("Open JavaScript console for this page");
|
js_console_action->set_status_tip("Open JavaScript console for this page");
|
||||||
inspect_menu.add_action(js_console_action);
|
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");
|
auto& settings_menu = add_menu("&Settings");
|
||||||
|
|
||||||
m_change_homepage_action = GUI::Action::create(
|
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();
|
m_cookie_jar.dump_cookies();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
new_tab.on_want_cookies = [this]() {
|
||||||
|
return m_cookie_jar.get_all_cookies();
|
||||||
|
};
|
||||||
|
|
||||||
new_tab.load(url);
|
new_tab.load(url);
|
||||||
|
|
||||||
dbgln_if(SPAM_DEBUG, "Added new tab {:p}, loading {}", &new_tab, url);
|
dbgln_if(SPAM_DEBUG, "Added new tab {:p}, loading {}", &new_tab, url);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue