Planetsuzy Threads - Hide images in signatures

This script will automatically hide all images in signatures under each forum post

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

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

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

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.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @namespace Planetsuzy
// @name Planetsuzy Threads - Hide images in signatures
// @description This script will automatically hide all images in signatures under each forum post
// @version 1.0
// @license MIT
// @icon http://ps.fscache.com/styles/style1/images/statusicon/forum_old.gif
// @include /^https?://(www\.)?planetsuzy\.org/showthread\.php/
// @include /^https?:\/\/(www\.)?planetsuzy\.org\/t\d+[\w-]+\.html$/
// ==/UserScript==

const decoratePosts = function() {
  
  document.querySelectorAll('table[id^=post] [id^=td_post_]')
    .forEach(function (el) {
      let sigContext = false;
      for (let i = el.childNodes.length - 1; i >= 0; i--) {
        let node = el.childNodes[i];
        if (node.nodeType === Node.COMMENT_NODE && node.textContent.trim() === '/ sig') {
          sigContext = true;
        } else if (node.nodeType === Node.COMMENT_NODE && node.textContent.trim() === 'sig') {
          sigContext = false;
        } else if (sigContext && typeof node.querySelectorAll === 'function') {
          node.querySelectorAll('img')
            .forEach(function (img) {
              img.style.display = 'none';
            });
        }
      }
    });
};


decoratePosts();