Exemplo n.º 1
0
def init(args):
    """Initialize all QWeb(Engine)Settings."""
    if objects.backend == usertypes.Backend.QtWebEngine:
        from qutebrowser.browser.webengine import webenginesettings
        webenginesettings.init(args)
    else:
        from qutebrowser.browser.webkit import webkitsettings
        webkitsettings.init(args)
Exemplo n.º 2
0
def init():
    """Initialize all QWeb(Engine)Settings."""
    if objreg.get('args').backend == 'webengine':
        from qutebrowser.browser.webengine import webenginesettings
        webenginesettings.init()
    else:
        from qutebrowser.browser.webkit import webkitsettings
        webkitsettings.init()
Exemplo n.º 3
0
def init(args):
    """Initialize all QWeb(Engine)Settings."""
    if objects.backend == usertypes.Backend.QtWebEngine:
        from qutebrowser.browser.webengine import webenginesettings
        webenginesettings.init(args)
    else:
        from qutebrowser.browser.webkit import webkitsettings
        webkitsettings.init(args)
Exemplo n.º 4
0
def init(args):
    """Initialize all QWeb(Engine)Settings."""
    if args.backend == 'webengine':
        from qutebrowser.browser.webengine import webenginesettings
        webenginesettings.init(args)
    else:
        from qutebrowser.browser.webkit import webkitsettings
        webkitsettings.init(args)
Exemplo n.º 5
0
def init():
    """Initialize all QWeb(Engine)Settings."""
    if objreg.get('args').backend == 'webengine':
        from qutebrowser.browser.webengine import webenginesettings
        webenginesettings.init()
    else:
        from qutebrowser.browser.webkit import webkitsettings
        webkitsettings.init()
Exemplo n.º 6
0
def init(args):
    """Initialize all QWeb(Engine)Settings."""
    if args.backend == "webengine":
        from qutebrowser.browser.webengine import webenginesettings

        webenginesettings.init(args)
    else:
        from qutebrowser.browser.webkit import webkitsettings

        webkitsettings.init(args)
Exemplo n.º 7
0
def init(args: argparse.Namespace) -> None:
    """Initialize all QWeb(Engine)Settings."""
    if objects.backend == usertypes.Backend.QtWebEngine:
        from qutebrowser.browser.webengine import webenginesettings
        webenginesettings.init(args)
    else:
        from qutebrowser.browser.webkit import webkitsettings
        webkitsettings.init(args)

    # Make sure special URLs always get JS support
    for pattern in ['file://*', 'chrome://*/*', 'qute://*/*']:
        config.instance.set_obj('content.javascript.enabled', True,
                                pattern=urlmatch.UrlPattern(pattern))
Exemplo n.º 8
0
def init(args):
    """Initialize all QWeb(Engine)Settings."""
    if objects.backend == usertypes.Backend.QtWebEngine:
        from qutebrowser.browser.webengine import webenginesettings
        webenginesettings.init(args)
    else:
        from qutebrowser.browser.webkit import webkitsettings
        webkitsettings.init(args)

    # Make sure special URLs always get JS support
    for pattern in ['file://*', 'chrome://*/*', 'qute://*/*']:
        config.instance.set_obj('content.javascript.enabled', True,
                                pattern=urlmatch.UrlPattern(pattern))