Disable images in signatures

Discuss issues and requests related with the forum software
User avatar
Posts: 56
Joined: 08 Mar 2019, 16:39

Disable images in signatures

27 Mar 2019, 19:56

Some people have taken it upon themselves to attempt to enforce forum policies(?) by including obnoxious images in their forum signatures. While I can only assume this was done in good faith, the implementation is lacking and positively disruptive to the casual browsing experience. I can do just fine without the sporadic reminders to "enclose code in code tags", considering I am nowhere even close to submitting code (or submitting anything, for that matter) in the first place.

Unfortunately, no native facilities have been provided to disable the rendering of images in signatures, it seems. Of course, one could always disable signatures altogether or outright block offending users. Those are rather drastic measures, not without their drawbacks. I am currently running a userscript to get rid of the images, though I would have liked it if it was supported natively.

The script, for anyone else interested:

Code: Select all

// ==UserScript==
// @name         AHK Delete Images from Signatures
// @match        https://www.autohotkey.com/boards/*
// ==/UserScript==

(function() {
    'use strict';

    let Signatures = document.querySelectorAll('div.signature')
    Signatures.forEach(Sig => Array.from(Sig.children)
                                   .filter(e => /img|br/i.test(e.tagName))
                                   .forEach(e => e.remove()))

    let Post = Signatures.parentNode
    while(!/inner/i.test((Post = Post.parentNode).className)) {}
    Post.firstElementChild.style.minHeight = '100px'
User avatar
Posts: 7794
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada

Re: Disable images in signatures

27 Mar 2019, 22:50

Thanks for sharing :+1:

Return to “Forum Issues”

Who is online

Users browsing this forum: No registered users and 2 guests