diff options
author | Florian Bruhin <me@the-compiler.org> | 2021-01-30 15:56:44 +0100 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2021-01-30 16:12:04 +0100 |
commit | 88040e539c5e9631f9cde9301d9b31f808a97356 (patch) | |
tree | bd79d7cb5b2730b6fcf9fc98b62bc4bb387bcec6 | |
parent | 65c4ded183c1df2e76d04e4e0c44fad420ed3328 (diff) | |
download | qutebrowser-88040e539c5e9631f9cde9301d9b31f808a97356.tar.gz qutebrowser-88040e539c5e9631f9cde9301d9b31f808a97356.zip |
Also preload JavaScript quirks files
I thought about implementing recursive globbing for preloading, but that
would also potentially preload things we don't necessarily need
preloaded, such as html/doc/*.html.
Fixes #6098
(cherry picked from commit 62c71975a2a1d270d77c283fb6d912be50cb929b)
-rw-r--r-- | qutebrowser/utils/utils.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/qutebrowser/utils/utils.py b/qutebrowser/utils/utils.py index a52c5fada..5c9b89cbe 100644 --- a/qutebrowser/utils/utils.py +++ b/qutebrowser/utils/utils.py @@ -237,7 +237,11 @@ def _glob_resources( def preload_resources() -> None: """Load resource files into the cache.""" resource_path = _resource_path('') - for subdir, ext in [('html', '.html'), ('javascript', '.js')]: + for subdir, ext in [ + ('html', '.html'), + ('javascript', '.js'), + ('javascript/quirks', '.js'), + ]: for name in _glob_resources(resource_path, subdir, ext): _resource_cache[name] = read_file(name) |