~pvsr/dotfiles

ref: 06c21dc469bc3db267611950125cf7185ad94df6 dotfiles/qutebrowser/.config/qutebrowser/conf.d/js.py -rw-r--r-- 506 bytes
06c21dc4Peter Rice enable js by default 3 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
if not config.get('content.javascript.enabled'):
    for protocol in (
            'file',
            'chrome',
            'qute'
            ):
        config.set('content.javascript.enabled', True, protocol + '://*')

    try:
        with open(config.configdir / 'conf.d' / 'domains', 'r') as f:
            for domain in f.read().splitlines():
                config.set('content.javascript.enabled', True, domain)
    except FileNotFoundError:
        config.set('content.javascript.enabled', True)