diff options
author | Ander Punnar <ander@kvlt.ee> | 2021-04-13 22:27:53 +0300 |
---|---|---|
committer | Ander Punnar <ander@kvlt.ee> | 2021-04-13 22:27:53 +0300 |
commit | 0fe9520042f6ad46fbc55a3b92793c85c13e5b7c (patch) | |
tree | 50e21a055bdba4a7e5aca8b93007f62f5c012c15 /qutebrowser/config | |
parent | 26b84e1c9502d4178c0d0dbcf07a8f8eca8606cb (diff) | |
parent | dacaefaf38bd854d95b4ee10f4c5d563bbcb7240 (diff) | |
download | qutebrowser-0fe9520042f6ad46fbc55a3b92793c85c13e5b7c.tar.gz qutebrowser-0fe9520042f6ad46fbc55a3b92793c85c13e5b7c.zip |
Merge remote-tracking branch 'origin/master' into 4nd3r/hostblock_subdomains
Diffstat (limited to 'qutebrowser/config')
-rw-r--r-- | qutebrowser/config/configdata.yml | 30 | ||||
-rw-r--r-- | qutebrowser/config/configtypes.py | 13 |
2 files changed, 33 insertions, 10 deletions
diff --git a/qutebrowser/config/configdata.yml b/qutebrowser/config/configdata.yml index 1c0f03d37..6faf1fd0c 100644 --- a/qutebrowser/config/configdata.yml +++ b/qutebrowser/config/configdata.yml @@ -552,8 +552,14 @@ content.site_specific_quirks.skip: - misc-krunker - misc-mathml-darkmode none_ok: true - default: [] - desc: 'Disable a list of named quirks.' + default: ["js-string-replaceall"] + desc: >- + Disable a list of named quirks. + + The js-string-replaceall quirk is needed for Nextcloud Calendar < 2.2.0 with + QtWebEngine < 5.15.3. However, the workaround is not fully compliant to the + ECMAScript spec and might cause issues on other websites, so it's disabled by + default. # emacs: ' @@ -651,14 +657,14 @@ content.headers.user_agent: # Vim-protip: Place your cursor below this comment and run # :r!python scripts/dev/ua_fetch.py - - "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like - Gecko) Chrome/88.0.4324.96 Safari/537.36" - - Chrome 88 Linux + Gecko) Chrome/89.0.4389.90 Safari/537.36" + - Chrome 89 Linux - - "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, - like Gecko) Chrome/88.0.4324.104 Safari/537.36" - - Chrome 88 Win10 + like Gecko) Chrome/89.0.4389.90 Safari/537.36" + - Chrome 89 Win10 - - "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 - (KHTML, like Gecko) Chrome/88.0.4324.96 Safari/537.36" - - Chrome 88 macOS + (KHTML, like Gecko) Chrome/89.0.4389.90 Safari/537.36" + - Chrome 89 macOS supports_pattern: true desc: | User agent to send. @@ -1917,7 +1923,7 @@ statusbar.widgets: type: name: List valtype: - name: String + name: StatusbarWidget valid_values: - url: "Current page URL." - scroll: "Percentage of the current page position like `10%`." @@ -1929,7 +1935,11 @@ statusbar.widgets: - progress: "Progress bar for the current page loading." none_ok: true default: ['keypress', 'url', 'scroll', 'history', 'tabs', 'progress'] - desc: List of widgets displayed in the statusbar. + desc: >- + List of widgets displayed in the statusbar. + + In addition to the listed values there is also the possibility + to add `text:foo` widgets that will display `foo`. ## tabs diff --git a/qutebrowser/config/configtypes.py b/qutebrowser/config/configtypes.py index 49a1f0356..c157fba41 100644 --- a/qutebrowser/config/configtypes.py +++ b/qutebrowser/config/configtypes.py @@ -1996,3 +1996,16 @@ class UrlPattern(BaseType): return urlmatch.UrlPattern(value) except urlmatch.ParseError as e: raise configexc.ValidationError(value, str(e)) + + +class StatusbarWidget(String): + + """A widget for the status bar. + + Allows some predefined widgets and custom text-widgets via text:$CONTENT. + """ + + def _validate_valid_values(self, value: str) -> None: + if value.startswith("text:"): + return + super()._validate_valid_values(value) |