Skip to content

Instantly share code, notes, and snippets.

@skyghis
Last active May 21, 2024 07:25
Show Gist options
  • Save skyghis/eac11f150ffb9a7e005ce1c6fe5bb525 to your computer and use it in GitHub Desktop.
Save skyghis/eac11f150ffb9a7e005ce1c6fe5bb525 to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name Ygg corriger l'affichage des images
// @version 1.1.5
// @description Corrige le soucis d'affichage des images dans les posts (https://www2.yggtorrent.si/forum/index.php?threads/probleme-affichage-image-dans-mes-up.46302/page-9)
// @namespace https://gist.github.com/skyghis/eac11f150ffb9a7e005ce1c6fe5bb525
// @updateURL https://gist.github.com/skyghis/eac11f150ffb9a7e005ce1c6fe5bb525/raw
// @match https://*ygg.*/*
// @icon https://www.ygg.re/favicon.ico
// @author SkyghiS
// @homepageURL https://gist.github.com/skyghis/eac11f150ffb9a7e005ce1c6fe5bb525
// @run-at document-idle
// ==/UserScript==
const imgProxyToRemove = "https://images.weserv.nl/?url=";
[...document.getElementsByTagName("img")]
.filter(i => i.src.startsWith(imgProxyToRemove))
.forEach(i => i.src = i.src.replaceAll(imgProxyToRemove, ""));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment