From a5d7cc63ed054faf0d5846767cf59256536dda8b Mon Sep 17 00:00:00 2001 From: Aevann Date: Tue, 21 Mar 2023 15:58:14 +0200 Subject: [PATCH] cachebust all assets --- files/assets/browserconfig.xml | 2 +- files/assets/css/agendaposter.css | 2 +- files/assets/css/main.css | 2 +- files/assets/fistmas/css/fistmas.css | 10 +-- files/assets/fistmas/css/lights.css | 2 +- files/assets/js/casino/roulette_screen.js | 4 +- files/assets/js/chat.js | 4 +- files/assets/js/fp.js | 2 +- files/assets/js/hats.js | 2 +- files/assets/js/lottery.js | 2 +- files/assets/js/settings_profile.js | 2 +- files/assets/manifest_WPD.json | 4 +- files/assets/manifest_rDrama.json | 4 +- files/assets/offline.html | 2 +- files/classes/badges.py | 4 +- files/classes/sub.py | 4 +- files/classes/submission.py | 12 ++-- files/classes/user.py | 6 +- files/helpers/alerts.py | 2 +- files/routes/jinja2.py | 2 +- files/templates/admin/patrons.html | 2 +- files/templates/casino/game_screen.html | 4 +- files/templates/casino/roulette_screen.html | 4 +- files/templates/casino/slots_screen.html | 6 +- files/templates/comments.html | 6 +- files/templates/errors/WPD/404.html | 74 ++++++++++----------- files/templates/errors/WPD/502.html | 74 ++++++++++----------- files/templates/errors/rDrama/404.html | 72 ++++++++++---------- files/templates/errors/rDrama/502.html | 72 ++++++++++---------- files/templates/fistmas/awards.html | 2 +- files/templates/fistmas/music.html | 2 +- files/templates/hats.html | 4 +- files/templates/header.html | 4 +- files/templates/log.html | 2 +- files/templates/lottery.html | 4 +- files/templates/notifications.html | 2 +- files/templates/sidebar_WPD.html | 2 +- files/templates/user_in_table.html | 2 +- files/templates/user_listing.html | 2 +- files/templates/userpage/banner.html | 16 ++--- files/templates/util/html_head.html | 16 ++--- files/templates/util/macros.html | 8 +-- 42 files changed, 227 insertions(+), 227 deletions(-) diff --git a/files/assets/browserconfig.xml b/files/assets/browserconfig.xml index 5845582c3..b06078e36 100644 --- a/files/assets/browserconfig.xml +++ b/files/assets/browserconfig.xml @@ -2,7 +2,7 @@ - + #FF66AC diff --git a/files/assets/css/agendaposter.css b/files/assets/css/agendaposter.css index 9ffee1cef..6f22efe11 100644 --- a/files/assets/css/agendaposter.css +++ b/files/assets/css/agendaposter.css @@ -1,3 +1,3 @@ html { - cursor:url('/i/dildo.webp?v=2000'), auto; + cursor:url('/i/dildo.webp?x=1'), auto; } diff --git a/files/assets/css/main.css b/files/assets/css/main.css index a2c58bb64..28741825b 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -5617,7 +5617,7 @@ lite-youtube > .lty-playbtn { left: 50%; z-index: 1; background-color: transparent; - background-image: url('/i/youtube.webp?v=2000'); + background-image: url('/i/youtube.webp?x=1'); transition: filter .1s cubic-bezier(0, 0, 0.2, 1); border: none; } diff --git a/files/assets/fistmas/css/fistmas.css b/files/assets/fistmas/css/fistmas.css index be06cbfb5..6468cff94 100644 --- a/files/assets/fistmas/css/fistmas.css +++ b/files/assets/fistmas/css/fistmas.css @@ -136,15 +136,15 @@ color: #7a7a7a !important; } body { - cursor: url(/assets/fistmas/images/cursor.webp?v=1), auto !important; + cursor: url(/assets/fistmas/images/cursor.webp?x=1), auto !important; } textarea, input[type=textbox], input[type=search] { - cursor: url(/assets/fistmas/images/text.webp?v=1) 9 14, auto !important; + cursor: url(/assets/fistmas/images/text.webp?x=1) 9 14, auto !important; } .btn, input[type=button], button, a { - cursor: url(/assets/fistmas/images/pointer.webp?v=1), auto !important; + cursor: url(/assets/fistmas/images/pointer.webp?x=1), auto !important; } .fa-moon-over-sun:before{content:"\f74a"} @@ -170,7 +170,7 @@ textarea, input[type=textbox], input[type=search] { left: 0; height: 57px; width: 100%; - background: url('/assets/fistmas/images/lights.webp?v=1'); + background: url('/assets/fistmas/images/lights.webp?x=1'); animation: lights 1s infinite steps(2); pointer-events: none; } @@ -195,7 +195,7 @@ textarea, input[type=textbox], input[type=search] { .btn::after, .snow-cap::after { content: ''; pointer-events: none; - background: url("/assets/fistmas/images/snowcap.webp?v=1") repeat-x; + background: url("/assets/fistmas/images/snowcap.webp?x=1") repeat-x; background-size: contain; position: absolute; bottom: -18px; diff --git a/files/assets/fistmas/css/lights.css b/files/assets/fistmas/css/lights.css index e672672f1..8f878d0cb 100644 --- a/files/assets/fistmas/css/lights.css +++ b/files/assets/fistmas/css/lights.css @@ -5,7 +5,7 @@ left: 0; height: 57px; width: 100%; - background: url('/assets/fistmas/images/lights.webp?v=1'); + background: url('/assets/fistmas/images/lights.webp?x=1'); animation: lights 1s infinite steps(2); pointer-events: none; z-index: 1; diff --git a/files/assets/js/casino/roulette_screen.js b/files/assets/js/casino/roulette_screen.js index a07254394..2050fe138 100644 --- a/files/assets/js/casino/roulette_screen.js +++ b/files/assets/js/casino/roulette_screen.js @@ -221,7 +221,7 @@ function buildRouletteBets(bets) { const normalizedBets = formatNormalizedBets(bets); const coinImgHtml = ` coin { script.onload = resolve; script.onerror = reject; script.async = true; - script.src = "/assets/js/vendor/fp.js?v=1"; + script.src = "/assets/js/vendor/fp.js?x=1"; document.head.appendChild(script); }) .then(() => FingerprintJS.load({token: fp_token})); diff --git a/files/assets/js/hats.js b/files/assets/js/hats.js index 2368a35ec..86fc717ea 100644 --- a/files/assets/js/hats.js +++ b/files/assets/js/hats.js @@ -2,7 +2,7 @@ function equip_hat(t, hat_id, hat_name) { const profile_pic_hat = document.getElementById("profile-pic-35-hat"); function extra_actions(xhr) { if(xhr.status == 200) { - profile_pic_hat.src = `/i/hats/${hat_name}.webp?h=7` + profile_pic_hat.src = `/i/hats/${hat_name}.webp?x=1` profile_pic_hat.classList.remove('d-none') } } diff --git a/files/assets/js/lottery.js b/files/assets/js/lottery.js index 7ffc7a1c8..65dbf4e46 100644 --- a/files/assets/js/lottery.js +++ b/files/assets/js/lottery.js @@ -12,7 +12,7 @@ const lotteryOnReady = function () { setTimeout(() => { ticketPulled.style.display = "none"; ticketPulled.src = - "/i/rDrama/lottery_active.webp?v=2000&t=" + + "/i/rDrama/lottery_active.webp?x=1&t=" + new Date().getTime(); purchaseTicket.disabled = false; }, 1780); diff --git a/files/assets/js/settings_profile.js b/files/assets/js/settings_profile.js index 8017f1a79..2ebc07c76 100644 --- a/files/assets/js/settings_profile.js +++ b/files/assets/js/settings_profile.js @@ -89,7 +89,7 @@ function updatebgselection(){ let bgsDir = backgrounds[bgselector.selectedIndex].folder; for (i=0; i < bgsToDisplay.length; i++) { let onclickPost = bgsDir + "/" + bgsToDisplay[i]; - str += ``; + str += ``; } bgContainer.innerHTML = str; diff --git a/files/assets/manifest_WPD.json b/files/assets/manifest_WPD.json index fe3b17db7..298359ed6 100644 --- a/files/assets/manifest_WPD.json +++ b/files/assets/manifest_WPD.json @@ -8,13 +8,13 @@ "description": "WPD", "icons": [ { - "src": "/i/WPD/192.png?v=2001", + "src": "/i/WPD/192.png?x=1", "sizes": "192x192", "type": "image/png", "purpose": "any" }, { - "src": "/i/WPD/512.png?v=2001", + "src": "/i/WPD/512.png?x=1", "sizes": "512x512", "type": "image/png" } diff --git a/files/assets/manifest_rDrama.json b/files/assets/manifest_rDrama.json index f0d251fe4..0114d6024 100644 --- a/files/assets/manifest_rDrama.json +++ b/files/assets/manifest_rDrama.json @@ -7,13 +7,13 @@ "description": "rDrama", "icons": [ { - "src": "/i/rDrama/192.png?v=2001", + "src": "/i/rDrama/192.png?x=1", "sizes": "192x192", "type": "image/png", "purpose": "any" }, { - "src": "/i/rDrama/512.png?v=2001", + "src": "/i/rDrama/512.png?x=1", "sizes": "512x512", "type": "image/png" } diff --git a/files/assets/offline.html b/files/assets/offline.html index 8ca739785..a410934b9 100644 --- a/files/assets/offline.html +++ b/files/assets/offline.html @@ -1,7 +1,7 @@ No Internet Connection - +
diff --git a/files/classes/badges.py b/files/classes/badges.py index 265f9dffe..5c1436a1e 100644 --- a/files/classes/badges.py +++ b/files/classes/badges.py @@ -27,9 +27,9 @@ class BadgeDef(Base): @lazy def path(self): if 20 < self.id < 28 or self.id == 222: - return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/badges/{self.id}.webp?b=7" + return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/badges/{self.id}.webp?x=1" - return f"{SITE_FULL_IMAGES}/i/badges/{self.id}.webp?b=7" + return f"{SITE_FULL_IMAGES}/i/badges/{self.id}.webp?x=1" class Badge(Base): diff --git a/files/classes/sub.py b/files/classes/sub.py index 07ab6fee4..e5548b1d3 100644 --- a/files/classes/sub.py +++ b/files/classes/sub.py @@ -41,7 +41,7 @@ class Sub(Base): @lazy def sidebar_url(self): if self.sidebarurl: return self.sidebarurl - return f'{SITE_FULL_IMAGES}/i/{SITE_NAME}/sidebar.webp?v=3009' + return f'{SITE_FULL_IMAGES}/i/{SITE_NAME}/sidebar.webp?x=1' @property @lazy @@ -62,7 +62,7 @@ class Sub(Base): @lazy def marsey_url(self): if self.marseyurl: return self.marseyurl - return f'{SITE_FULL_IMAGES}/i/{SITE_NAME}/headericon.webp?v=3009' + return f'{SITE_FULL_IMAGES}/i/{SITE_NAME}/headericon.webp?x=1' @property @lazy diff --git a/files/classes/submission.py b/files/classes/submission.py index e88d96d0a..f1a735a11 100644 --- a/files/classes/submission.py +++ b/files/classes/submission.py @@ -154,20 +154,20 @@ class Submission(Base): @lazy def thumb_url(self): if self.over_18: - return f"{SITE_FULL_IMAGES}/i/nsfw.webp?v=1" + return f"{SITE_FULL_IMAGES}/i/nsfw.webp?x=1" elif not self.url: - return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/default_text.webp?v=2" + return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/default_text.webp?x=1" elif self.thumburl: if self.thumburl.startswith('/'): return SITE_FULL + self.thumburl return self.thumburl elif self.is_youtube or self.is_video: - return f"{SITE_FULL_IMAGES}/i/default_thumb_video.webp?v=2" + return f"{SITE_FULL_IMAGES}/i/default_thumb_video.webp?x=1" elif self.is_audio: - return f"{SITE_FULL_IMAGES}/i/default_thumb_audio.webp?v=1" + return f"{SITE_FULL_IMAGES}/i/default_thumb_audio.webp?x=1" elif self.domain in {SITE, BAN_EVASION_DOMAIN}: - return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/site_preview.webp?v=3009" + return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/site_preview.webp?x=1" else: - return f"{SITE_FULL_IMAGES}/i/default_thumb_link.webp?v=1" + return f"{SITE_FULL_IMAGES}/i/default_thumb_link.webp?x=1" @property @lazy diff --git a/files/classes/user.py b/files/classes/user.py index a2023ce6d..b6f6a36cc 100644 --- a/files/classes/user.py +++ b/files/classes/user.py @@ -526,7 +526,7 @@ class User(Base): def bio_html_eager(self): if self.bio_html == None: return '' return self.bio_html.replace('data-src', 'src') \ - .replace('src="/i/loading.webp?v=2000"', '') \ + .replace('src="/i/loading.webp?x=1"', '') \ .replace('src="/i/loading.webp"', '') \ .replace('src="/i/l.webp"', '') @@ -793,7 +793,7 @@ class User(Base): def banner_url(self): if FEATURES['USERS_PROFILE_BANNER'] and self.bannerurl and self.can_see_my_shit: return self.bannerurl - return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/site_preview.webp?v=3009" + return f"{SITE_FULL_IMAGES}/i/{SITE_NAME}/site_preview.webp?x=1" @property @lazy @@ -805,7 +805,7 @@ class User(Base): if self.profileurl and self.can_see_my_shit: if self.profileurl.startswith('/'): return SITE_FULL + self.profileurl return self.profileurl - return f"{SITE_FULL_IMAGES}/i/default-profile-pic.webp?v=1008" + return f"{SITE_FULL_IMAGES}/i/default-profile-pic.webp?x=1" @lazy def real_post_count(self, v): diff --git a/files/helpers/alerts.py b/files/helpers/alerts.py index 559a731c5..6e7e6ec64 100644 --- a/files/helpers/alerts.py +++ b/files/helpers/alerts.py @@ -218,7 +218,7 @@ def _push_notif_thread(subscriptions, title, body, url): "title": title, "body": body, 'url': url, - 'icon': f'{SITE_FULL}/icon.webp?v=1', + 'icon': f'{SITE_FULL}/icon.webp?x=1', }), vapid_private_key=VAPID_PRIVATE_KEY, vapid_claims={"sub": f"mailto:{EMAIL}"} diff --git a/files/routes/jinja2.py b/files/routes/jinja2.py index e9357e106..fe08b277d 100644 --- a/files/routes/jinja2.py +++ b/files/routes/jinja2.py @@ -40,7 +40,7 @@ def template_asset(ctx, asset_path): @app.template_filter("asset_siteimg") def template_asset_siteimg(asset_path): # TODO: Add hashing for these using files.helpers.assetcache - return f'{SITE_FULL_IMAGES}/i/{SITE_NAME}/{asset_path}?v=3010' + return f'{SITE_FULL_IMAGES}/i/{SITE_NAME}/{asset_path}?x=1' @app.template_filter("timestamp") def timestamp(timestamp): diff --git a/files/templates/admin/patrons.html b/files/templates/admin/patrons.html index 9fbc7b002..3fc91ad9f 100644 --- a/files/templates/admin/patrons.html +++ b/files/templates/admin/patrons.html @@ -14,7 +14,7 @@ {{loop.index}} {% include "user_in_table.html" %} - 2{{user.patron}} + 2{{user.patron}} {% endfor %} diff --git a/files/templates/casino/game_screen.html b/files/templates/casino/game_screen.html index 3852fa7bb..4dd290406 100644 --- a/files/templates/casino/game_screen.html +++ b/files/templates/casino/game_screen.html @@ -42,13 +42,13 @@
diff --git a/files/templates/casino/roulette_screen.html b/files/templates/casino/roulette_screen.html index 1fa8047a0..ad8e72e1e 100644 --- a/files/templates/casino/roulette_screen.html +++ b/files/templates/casino/roulette_screen.html @@ -26,10 +26,10 @@ Bets

diff --git a/files/templates/casino/slots_screen.html b/files/templates/casino/slots_screen.html index 807b0c31f..44c0b9af5 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/comments.html b/files/templates/comments.html index 24d7f952f..e13a101ea 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -159,11 +159,11 @@ đź‘» {% else %} {% if FEATURES['PATRON_ICONS'] and c.author.patron %} - {{c.author.patron_tooltip}} + {{c.author.patron_tooltip}} {% endif %} {% if FEATURES['HOUSES'] and c.author.house %} - House {{c.author.house}} + House {{c.author.house}} {% endif %} {% if c.author.verified %} @@ -173,7 +173,7 @@
{% if c.author.hat_active(v)[0] -%} - + {%- endif %}
{{c.author_name}} diff --git a/files/templates/errors/WPD/404.html b/files/templates/errors/WPD/404.html index 687cea06e..658841238 100644 --- a/files/templates/errors/WPD/404.html +++ b/files/templates/errors/WPD/404.html @@ -3,15 +3,15 @@ - - + + - + - + Not Found - WPD @@ -20,57 +20,57 @@ - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + - - site banner + + site banner