mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-05-20 01:59:01 +00:00
UI: Add an option to enable autoplay globally
This commit is contained in:
committed by
Tim Ledbetter
parent
973f774e56
commit
63632159ce
@@ -193,6 +193,15 @@ void ViewImplementation::set_enable_do_not_track(bool enable)
|
||||
client().async_set_enable_do_not_track(page_id(), enable);
|
||||
}
|
||||
|
||||
void ViewImplementation::set_enable_autoplay(bool enable)
|
||||
{
|
||||
if (enable) {
|
||||
client().async_set_autoplay_allowed_on_all_websites(page_id());
|
||||
} else {
|
||||
client().async_set_autoplay_allowlist(page_id(), {});
|
||||
}
|
||||
}
|
||||
|
||||
ByteString ViewImplementation::selected_text()
|
||||
{
|
||||
return client().get_selected_text(page_id());
|
||||
|
||||
Reference in New Issue
Block a user