mirror of
https://forge.fsky.io/oneflux/omegafox.git
synced 2026-04-11 08:52:04 -07:00
fix: add allow_addon_new_tab launch option
This commit is contained in:
parent
95cc4489d0
commit
c194fbae1c
3 changed files with 9 additions and 0 deletions
|
|
@ -356,6 +356,7 @@ def launch_options(
|
||||||
ff_version: Optional[int] = None,
|
ff_version: Optional[int] = None,
|
||||||
headless: Optional[bool] = None,
|
headless: Optional[bool] = None,
|
||||||
main_world_eval: Optional[bool] = None,
|
main_world_eval: Optional[bool] = None,
|
||||||
|
allow_addon_new_tab: Optional[bool] = None,
|
||||||
executable_path: Optional[Union[str, Path]] = None,
|
executable_path: Optional[Union[str, Path]] = None,
|
||||||
firefox_user_prefs: Optional[Dict[str, Any]] = None,
|
firefox_user_prefs: Optional[Dict[str, Any]] = None,
|
||||||
proxy: Optional[Dict[str, str]] = None,
|
proxy: Optional[Dict[str, str]] = None,
|
||||||
|
|
@ -424,6 +425,8 @@ def launch_options(
|
||||||
main_world_eval (Optional[bool]):
|
main_world_eval (Optional[bool]):
|
||||||
Whether to enable running scripts in the main world.
|
Whether to enable running scripts in the main world.
|
||||||
To use this, prepend "mw:" to the script: page.evaluate("mw:" + script).
|
To use this, prepend "mw:" to the script: page.evaluate("mw:" + script).
|
||||||
|
allow_addon_new_tab (Optional[bool]):
|
||||||
|
Whether to allow addon open new tabs. Defaults to False.
|
||||||
executable_path (Optional[Union[str, Path]]):
|
executable_path (Optional[Union[str, Path]]):
|
||||||
Custom Camoufox browser executable path.
|
Custom Camoufox browser executable path.
|
||||||
firefox_user_prefs (Optional[Dict[str, Any]]):
|
firefox_user_prefs (Optional[Dict[str, Any]]):
|
||||||
|
|
@ -586,6 +589,10 @@ def launch_options(
|
||||||
if main_world_eval:
|
if main_world_eval:
|
||||||
set_into(config, 'allowMainWorld', True)
|
set_into(config, 'allowMainWorld', True)
|
||||||
|
|
||||||
|
# Allow addon open new tabs
|
||||||
|
if allow_addon_new_tab:
|
||||||
|
set_into(config, 'allowAddonNewtab', True)
|
||||||
|
|
||||||
# Set Firefox user preferences
|
# Set Firefox user preferences
|
||||||
if block_images:
|
if block_images:
|
||||||
LeakWarning.warn('block_images', i_know_what_im_doing)
|
LeakWarning.warn('block_images', i_know_what_im_doing)
|
||||||
|
|
|
||||||
|
|
@ -297,6 +297,7 @@
|
||||||
"showcursor": "bool",
|
"showcursor": "bool",
|
||||||
|
|
||||||
"allowMainWorld": "bool",
|
"allowMainWorld": "bool",
|
||||||
|
"allowAddonNewtab": "bool",
|
||||||
"forceScopeAccess": "bool",
|
"forceScopeAccess": "bool",
|
||||||
"enableRemoteSubframes": "bool",
|
"enableRemoteSubframes": "bool",
|
||||||
"disableTheming": "bool",
|
"disableTheming": "bool",
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@
|
||||||
{ "property": "mediaDevices:speakers", "type": "uint" },
|
{ "property": "mediaDevices:speakers", "type": "uint" },
|
||||||
{ "property": "mediaDevices:enabled", "type": "bool" },
|
{ "property": "mediaDevices:enabled", "type": "bool" },
|
||||||
{ "property": "allowMainWorld", "type": "bool" },
|
{ "property": "allowMainWorld", "type": "bool" },
|
||||||
|
{ "property": "allowAddonNewtab", "type": "bool" },
|
||||||
{ "property": "forceScopeAccess", "type": "bool" },
|
{ "property": "forceScopeAccess", "type": "bool" },
|
||||||
{ "property": "enableRemoteSubframes", "type": "bool" },
|
{ "property": "enableRemoteSubframes", "type": "bool" },
|
||||||
{ "property": "disableTheming", "type": "bool" },
|
{ "property": "disableTheming", "type": "bool" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue