From 88040e539c5e9631f9cde9301d9b31f808a97356 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 30 Jan 2021 15:56:44 +0100 Subject: 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) --- qutebrowser/utils/utils.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3-54-g00ecf