Disable images in signatures

Discuss issues and requests related with the forum software
User avatar
lvalkov
Posts: 35
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
joedf
Posts: 7339
Joined: 29 Sep 2013, 17:08
Facebook: J0EDF
Google: +joedf
GitHub: joedf
Location: Canada
Contact:

Re: Disable images in signatures

27 Mar 2019, 22:50

Thanks for sharing :+1:
Image Image Image Image Image
Windows 10 x64 Professional, Intel i5-8500 @ 4.00 GHz, 2x8GB G.Skill RipJaws V - DDR4 3280 MHz, NVIDIA GTX 1060 6GB | [About Me] | [ASPDM - StdLib Distribution]
[Populate the AHK MiniCity!] | [Qonsole - Quake-like console emulator] | [LibCon - Autohotkey Console Library] | [About the AHK Foundation]

Return to “Forum Issues”

Who is online

Users browsing this forum: No registered users and 16 guests