Пример #1
0
       "User stylesheet to use (absolute filename or CSS string)."),
      ('css-media-type', SettingValue(typ.String(none_ok=True),
                                      ''), "Set the CSS media type."),
      ('remove-finished-downloads', SettingValue(typ.Bool(), 'false'),
       "Whether to remove finished downloads automatically."),
  )),
 ('network',
  sect.KeyValue(
      ('do-not-track', SettingValue(
          typ.Bool(), 'true'), "Value to send in the `DNT` header."),
      ('accept-language', SettingValue(
          typ.String(none_ok=True),
          'en-US,en'), "Value to send in the `accept-language` header."),
      ('user-agent', SettingValue(typ.String(none_ok=True), ''),
       "User agent to send. Empty to send the default."),
      ('proxy', SettingValue(typ.Proxy(), 'system'), "The proxy to use.\n\n"
       "In addition to the listed values, you can use a `socks://...` or "
       "`http://...` URL."),
      ('proxy-dns-requests', SettingValue(typ.Bool(), 'true'),
       "Whether to send DNS requests over the configured proxy."),
      ('ssl-strict', SettingValue(
          typ.BoolAsk(), 'ask'), "Whether to validate SSL handshakes."),
      ('dns-prefetch', SettingValue(typ.Bool(), 'true'),
       "Whether to try to pre-fetch DNS entries to speed up browsing."),
  )),
 ('completion',
  sect.KeyValue(
      ('show', SettingValue(typ.Bool(), 'true'),
       "Whether to show the autocompletion window."),
      ('height',
       SettingValue(typ.PercOrInt(minperc=0, maxperc=100, minint=1), '50%'),
Пример #2
0
    ('network', sect.KeyValue(
        ('do-not-track',
         SettingValue(typ.Bool(), 'true'),
         "Value to send in the `DNT` header."),

        ('accept-language',
         SettingValue(typ.String(none_ok=True), 'en-US,en'),
         "Value to send in the `accept-language` header."),

        ('user-agent',
         SettingValue(typ.String(none_ok=True), ''),
         "User agent to send. Empty to send the default."),

        ('proxy',
         SettingValue(typ.Proxy(), 'system'),
         "The proxy to use.\n\n"
         "In addition to the listed values, you can use a `socks://...` or "
         "`http://...` URL."),

        ('ssl-strict',
         SettingValue(typ.Bool(), 'true'),
         "Whether to validate SSL handshakes."),

        ('dns-prefetch',
         SettingValue(typ.Bool(), 'true'),
         "Whether to try to pre-fetch DNS entries to speed up browsing."),
    )),

    ('completion', sect.KeyValue(
        ('show',