forked from MarseyWorld/MarseyWorld
stop using 200w
parent
83193bc4df
commit
cabc0d3603
|
@ -215,8 +215,8 @@ function expandImage(url) {
|
|||
url = e.target.dataset.src
|
||||
if (!url) url = e.target.src
|
||||
}
|
||||
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");
|
||||
document.getElementById("desktop-expanded-image").src = url;
|
||||
document.getElementById("desktop-expanded-image-wrap-link").href = url;
|
||||
|
||||
bootstrap.Modal.getOrCreateInstance(document.getElementById('expandImageModal')).show();
|
||||
};
|
||||
|
|
|
@ -50,75 +50,75 @@ async function getGifs(form) {
|
|||
container.innerHTML = `
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Agree</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/wGhYz3FHaRJgk/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/wGhYz3FHaRJgk/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Laugh</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/O5NyCibf93upy/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/O5NyCibf93upy/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Confused</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/3o7btPCcdNniyf0ArS/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/3o7btPCcdNniyf0ArS/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Sad</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/ISOckXUybVfQ4/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/ISOckXUybVfQ4/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Happy</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/XR9Dp54ZC4dji/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/XR9Dp54ZC4dji/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Awesome</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/3ohzdIuqJoo8QdKlnW/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/3ohzdIuqJoo8QdKlnW/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Yes</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/J336VCs1JC42zGRhjH/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/J336VCs1JC42zGRhjH/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>No</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/1zSz5MVw4zKg0/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/1zSz5MVw4zKg0/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Love</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/4N1wOi78ZGzSB6H7vK/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/4N1wOi78ZGzSB6H7vK/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Please</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/qUIm5wu6LAAog/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/qUIm5wu6LAAog/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Scared</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/bEVKYB487Lqxy/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/bEVKYB487Lqxy/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Angry</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/12Pb87uq0Vwq2c/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/12Pb87uq0Vwq2c/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Awkward</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/unFLKoAV3TkXe/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/unFLKoAV3TkXe/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Cringe</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/1jDvQyhGd3L2g/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/1jDvQyhGd3L2g/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>OMG</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/3o72F8t9TDi2xVnxOE/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/3o72F8t9TDi2xVnxOE/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Why</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/1M9fmo1WAFVK0/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/1M9fmo1WAFVK0/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Gross</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/pVAMI8QYM42n6/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/pVAMI8QYM42n6/giphy.webp">
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="gif-cat-overlay"><div>Meh</div></div>
|
||||
<img loading="lazy" src="https://media.giphy.com/media/xT77XTpyEzJ4OJO06c/200w.webp">
|
||||
<img loading="lazy" src="https://media.giphy.com/media/xT77XTpyEzJ4OJO06c/giphy.webp">
|
||||
</div>`
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ async function searchGifs(searchTerm) {
|
|||
}
|
||||
else {
|
||||
for (let i = 0; i < 48; i++) {
|
||||
gifURL[i] = "https://media.giphy.com/media/" + data[i].id + "/200w.webp";
|
||||
gifURL[i] = "https://media.giphy.com/media/" + data[i].id + "/giphy.webp";
|
||||
const insert = `<img class="giphy" loading="lazy" data-bs-dismiss="modal" src="${gifURL[i]}"></div>`
|
||||
container.insertAdjacentHTML('beforeend', insert);
|
||||
noGIFs.innerHTML = null;
|
||||
|
|
|
@ -476,8 +476,7 @@ 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.webp") \
|
||||
.replace("/giphy.webp", "/200w.webp") \
|
||||
.replace("/giphy.gif", "/giphy.webp")
|
||||
|
||||
url = imgur_regex.sub(r'\1_d.webp?maxwidth=9999&fidelity=grand', url)
|
||||
url = giphy_regex.sub(r'\1.webp', url)
|
||||
|
|
Loading…
Reference in New Issue