From 1e30acc5a87a00ba9d53c97b5a97249aa90315cb Mon Sep 17 00:00:00 2001 From: Aevann Date: Fri, 27 Jan 2023 19:55:25 +0200 Subject: [PATCH] make all images have loading="lazy" --- files/assets/js/casino/roulette_screen.js | 4 ++-- files/assets/js/markdown.js | 6 +++--- files/assets/offline.html | 2 +- files/helpers/sanitize.py | 4 ++-- files/templates/app.html | 4 ++-- files/templates/awards.html | 4 ++-- files/templates/casino/game_screen.html | 6 +++--- files/templates/casino/rehab.html | 2 +- files/templates/casino/roulette_screen.html | 8 ++++---- files/templates/casino/slots_screen.html | 6 +++--- files/templates/chat.html | 2 +- files/templates/errors/WPD/502.html | 6 +++--- files/templates/errors/rDrama/502.html | 6 +++--- files/templates/fistmas/awards.html | 2 +- files/templates/fistmas/banner.html | 2 +- files/templates/formatting.html | 4 ++-- files/templates/hats.html | 2 +- files/templates/header.html | 12 ++++++------ files/templates/log.html | 4 ++-- files/templates/login/sign_up.html | 4 ++-- files/templates/lottery.html | 2 +- files/templates/shop.html | 2 +- files/templates/submission.html | 2 +- files/templates/userpage/banner.html | 10 +++++----- files/templates/util/macros.html | 2 +- 25 files changed, 54 insertions(+), 54 deletions(-) diff --git a/files/assets/js/casino/roulette_screen.js b/files/assets/js/casino/roulette_screen.js index 0b5588ada9..a072543945 100644 --- a/files/assets/js/casino/roulette_screen.js +++ b/files/assets/js/casino/roulette_screen.js @@ -209,8 +209,8 @@ function formatNormalizedBets(bets) { function buildPokerChip(avatar) { return `
- - + +
`; } diff --git a/files/assets/js/markdown.js b/files/assets/js/markdown.js index a5e0997a15..698716e932 100644 --- a/files/assets/js/markdown.js +++ b/files/assets/js/markdown.js @@ -21,7 +21,7 @@ marked.use({ }, renderer(token) { const u = token.raw; - return ` ${u}`; + return ` ${u}`; } } ] @@ -65,9 +65,9 @@ function markdown(t) { if (emoji.endsWith('pat') && emoji != 'marseyunpettablepat') { emoji = emoji.substr(0, emoji.length - 3); const url = old.indexOf('@') != -1 ? `/@${emoji}/pic` : `/e/${emoji}.webp`; - input = input.replace(old, ``); + input = input.replace(old, ``); } else { - input = input.replace(old, ``); + input = input.replace(old, ``); } } } diff --git a/files/assets/offline.html b/files/assets/offline.html index 8d70e6e5f2..79e7427f0a 100644 --- a/files/assets/offline.html +++ b/files/assets/offline.html @@ -6,7 +6,7 @@
- +

No Internet

You need an internet connection to browse this site

diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index d4cb38f501..afc3a6f7b7 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -174,10 +174,10 @@ def render_emoji(html, regexp, golden, marseys_used, b=False): if emoji.endswith('pat') and emoji != 'marseyunpettablepat': if path.isfile(f"files/assets/images/emojis/{emoji.replace('pat','')}.webp"): - emoji_html = f'{emoji_partial_pat.format(old, f"/e/{emoji[:-3]}.webp", attrs)}' + emoji_html = f'{emoji_partial_pat.format(old, f"/e/{emoji[:-3]}.webp", attrs)}' elif emoji.startswith('@'): if u := get_user(emoji[1:-3], graceful=True): - emoji_html = f'{emoji_partial_pat.format(old, f"/pp/{u.id}", attrs)}' + emoji_html = f'{emoji_partial_pat.format(old, f"/pp/{u.id}", attrs)}' elif path.isfile(f'files/assets/images/emojis/{emoji}.webp'): emoji_html = emoji_partial.format(old, f'/e/{emoji}.webp', attrs) diff --git a/files/templates/app.html b/files/templates/app.html index 958762676b..6cab1f0d54 100644 --- a/files/templates/app.html +++ b/files/templates/app.html @@ -11,9 +11,9 @@ {% endif %}
First step:
- First step + First step
Second step:
- Second step + Second step
{% endblock %} diff --git a/files/templates/awards.html b/files/templates/awards.html index 763edbc33a..34b23a20e0 100644 --- a/files/templates/awards.html +++ b/files/templates/awards.html @@ -3,7 +3,7 @@
{% for i in range(min(p.award_count(award, v), 4)) %}
- {{alt}} + {{alt}}
{% endfor %}
@@ -34,7 +34,7 @@ {% if p.award_count("ricardo", v) %} {% for i in range(min(p.award_count("ricardo", v), 3)) %}
- +
{% endfor %} {% endif %} diff --git a/files/templates/casino/game_screen.html b/files/templates/casino/game_screen.html index 4a6c513dab..cf302b376a 100644 --- a/files/templates/casino/game_screen.html +++ b/files/templates/casino/game_screen.html @@ -42,13 +42,13 @@ @@ -81,7 +81,7 @@ {%- macro leaderboard(text, css_class, marsey, color) -%}
- +
diff --git a/files/templates/casino/rehab.html b/files/templates/casino/rehab.html index 19b49bae43..26c3ecfbad 100644 --- a/files/templates/casino/rehab.html +++ b/files/templates/casino/rehab.html @@ -9,6 +9,6 @@

…but we’re here for you. You’ve been checked into Rehab.

- +
{% endblock %} diff --git a/files/templates/casino/roulette_screen.html b/files/templates/casino/roulette_screen.html index cb182b8f4f..6bae2e3585 100644 --- a/files/templates/casino/roulette_screen.html +++ b/files/templates/casino/roulette_screen.html @@ -19,17 +19,17 @@ Bets
- - + +

111 is betting 4 and 4:

    -
  • 2 coin2 coin that the number will be black.
  • -
  • 2 coin2 coin that the number will be even.
diff --git a/files/templates/casino/slots_screen.html b/files/templates/casino/slots_screen.html index da12c2f4ec..66ef39dc5d 100644 --- a/files/templates/casino/slots_screen.html +++ b/files/templates/casino/slots_screen.html @@ -9,13 +9,13 @@
- coin + coin
- coin + coin
- coin + coin
{% endblock %} diff --git a/files/templates/chat.html b/files/templates/chat.html index 37e1fa0528..4b5c9bfaf4 100644 --- a/files/templates/chat.html +++ b/files/templates/chat.html @@ -25,7 +25,7 @@ {% macro chat_group_template(id, m) %}
-
{% if m %}{{m['username']}}{% else %}NULL{% endif %}
+
{% if m %}{{m['username']}}{% else %}NULL{% endif %}
{% if m %}{{m['time'] | timestamp}}{% else %}just now{% endif %} {% endmacro %} diff --git a/files/templates/errors/WPD/502.html b/files/templates/errors/WPD/502.html index 2b54ded56f..0be92ee118 100644 --- a/files/templates/errors/WPD/502.html +++ b/files/templates/errors/WPD/502.html @@ -58,19 +58,19 @@ - site banner + site banner