Hide dead links - MagnetDL

Hides magnet links without any seeders.

Version vom 08.05.2024. Aktuellste Version

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Hide dead links - MagnetDL
// @namespace    https://greasyfork.org/en/users/670188-hacker09?sort=daily_installs
// @version      3
// @description  Hides magnet links without any seeders.
// @author       hacker09
// @include      https://www.magnetdl.com/*/*
// @icon         https://www.magnetdl.com/img/m.gif
// @run-at       document-end
// @grant        none
// ==/UserScript==

(function() {
  'use strict';
  new MutationObserver(function() {
    document.querySelectorAll(".s").forEach(function(el) { //forEach link start the MutationObserver
      if (el.innerText === '0') { //If seeder count is zero
        el.parentNode.style.display = 'none'; //Hide the parent element
        el.parentNode.previousElementSibling !== null ? el.parentNode.previousElementSibling.style.display = 'none' : ''; //Hide the previous blue line element
      } //Finishes the if condition
    }) //Finishes the forEach loop
  }).observe(document, { childList: true, subtree: true }); //Finishes the MutationObserver
})();