1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:17:36 +00:00

Browser: Add ability to delete cookies from Storage Inspector

Adds actions to delete either a single cookie, or all of them.

This looks weird, because the GUI doesn't update until you "Inspect >
Open Storage Inspector", but it does function. :^)
This commit is contained in:
Sam Atkins 2022-10-20 16:38:20 +01:00 committed by Linus Groh
parent c11462f40e
commit 4d9c0c7b22
5 changed files with 53 additions and 1 deletions

View file

@ -614,6 +614,10 @@ void Tab::show_storage_inspector()
storage_window->set_title("Storage inspector");
storage_window->set_icon(g_icon_bag.cookie);
m_storage_widget = storage_window->set_main_widget<StorageWidget>();
m_storage_widget->on_update_cookie = [this](Web::Cookie::Cookie cookie) {
if (on_update_cookie)
on_update_cookie(url(), move(cookie));
};
}
if (on_get_cookies_entries) {