mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 23:59:49 +00:00
UI: Add an option to enable autoplay globally
This commit is contained in:
parent
973f774e56
commit
63632159ce
Notes:
github-actions[bot]
2024-09-24 22:51:57 +00:00
Author: https://github.com/tcl3
Commit: 63632159ce
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1497
Reviewed-by: https://github.com/trflynn89
18 changed files with 98 additions and 0 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue