diff --git a/files/assets/js/core.js b/files/assets/js/core.js index 886ad8216..cf4b603f1 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -234,8 +234,8 @@ function expandImage(url) { url = e.target.dataset.src if (!url) url = e.target.src } - document.getElementById("desktop-expanded-image").src = url.replace("200w_d.webp", "giphy.webp"); - document.getElementById("desktop-expanded-image-wrap-link").href = url.replace("200w_d.webp", "giphy.webp"); + document.getElementById("desktop-expanded-image").src = url.replace("200w.webp", "giphy.webp"); + document.getElementById("desktop-expanded-image-wrap-link").href = url.replace("200w.webp", "giphy.webp"); bootstrap.Modal.getOrCreateInstance(document.getElementById('expandImageModal')).show(); }; diff --git a/files/assets/js/gif_modal.js b/files/assets/js/gif_modal.js index f9f6a3f23..478560ca6 100644 --- a/files/assets/js/gif_modal.js +++ b/files/assets/js/gif_modal.js @@ -47,7 +47,7 @@ async function getGifs(form) { noGIFs.innerHTML = null; loadGIFs.innerHTML = null; - container.innerHTML = '
Agree
Laugh
Confused
Sad
Happy
Awesome
Yes
No
Love
Please
Scared
Angry
Awkward
Cringe
OMG
Why
Gross
Meh
' + container.innerHTML = '
Agree
Laugh
Confused
Sad
Happy
Awesome
Yes
No
Love
Please
Scared
Angry
Awkward
Cringe
OMG
Why
Gross
Meh
' } async function searchGifs(searchTerm) { @@ -78,7 +78,7 @@ async function searchGifs(searchTerm) { } else { for (let i = 0; i < 48; i++) { - gifURL[i] = "https://media.giphy.com/media/" + data[i].id + "/200w_d.webp"; + gifURL[i] = "https://media.giphy.com/media/" + data[i].id + "/200w.webp"; const insert = `` container.insertAdjacentHTML('beforeend', insert); noGIFs.innerHTML = null; diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 8af572be0..f81266dca 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -472,8 +472,8 @@ def normalize_url(url): .replace("https://nitter.net/", "https://twitter.com/") \ .replace("https://nitter.42l.fr/", "https://twitter.com/") \ .replace("https://nitter.lacontrevoie.fr/", "https://twitter.com/") \ - .replace("/giphy.gif", "/200w_d.webp") \ - .replace("/giphy.webp", "/200w_d.webp") \ + .replace("/giphy.gif", "/200w.webp") \ + .replace("/giphy.webp", "/200w.webp") \ url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=grand', url) url = giphy_regex.sub(r'\1.webp', url)