Skip to content

Commit

Permalink
Added preload hints in privacy plugin replacements (#7733)
Browse files Browse the repository at this point in the history
  • Loading branch information
nejch authored Nov 22, 2024
1 parent eee4934 commit 6a0a790
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions material/plugins/privacy/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ def replace(match: Match):
if rel == "preconnect":
return ""

# Replace external style sheet or favicon
if rel == "stylesheet" or rel == "icon":
# Replace external favicon, preload hint or style sheet
if rel in ("icon", "preload", "stylesheet"):
file = self._queue(url, config)
el.set("href", resolve(file))

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/privacy/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ def replace(match: Match):
if rel == "preconnect":
return ""

# Replace external style sheet or favicon
if rel == "stylesheet" or rel == "icon":
# Replace external favicon, preload hint or style sheet
if rel in ("icon", "preload", "stylesheet"):
file = self._queue(url, config)
el.set("href", resolve(file))

Expand Down

0 comments on commit 6a0a790

Please sign in to comment.