summaryrefslogtreecommitdiff
path: root/qutebrowser/utils/utils.py
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-01-30 15:56:44 +0100
committerFlorian Bruhin <me@the-compiler.org>2021-01-30 15:56:44 +0100
commit62c71975a2a1d270d77c283fb6d912be50cb929b (patch)
tree6b138c74fa1e6d751302486c0722bc86f44fc4c3 /qutebrowser/utils/utils.py
parent41087d3adf42c48ef08f5851af43b26809753c4c (diff)
downloadqutebrowser-62c71975a2a1d270d77c283fb6d912be50cb929b.tar.gz
qutebrowser-62c71975a2a1d270d77c283fb6d912be50cb929b.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
Diffstat (limited to 'qutebrowser/utils/utils.py')
-rw-r--r--qutebrowser/utils/utils.py6
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)