1
Everything else / Re: A simple chatrooms with video chat support.
« Last post by rejetto on September 09, 2024, 07:36:32 AM »nice tool!
it should be fixed now.Yes, I confirm that now it works...
works as expected, bots will be able to have fun againTo avoid bots, according to forum's documentation, "the most efficient anti-spam method provided by SMF" by default, without having to install any -Mod- (modification), is enabling "Verification Questions". I've read that adding three simple (but not so obvious) questions stops most bots. I highly recommend adding this to relieve Mars's task of cleaning the forum.
(function () {
// todo: is there an event fired by HFS when all elements are loaded? that would be better than this retry approach.
let retryUntilSuccessFunction;
retryUntilSuccessFunction = function () {
let images = document.querySelectorAll('span[role="img"].fa-image');
if (images.length === 0) {
setTimeout(retryUntilSuccessFunction, 100);
return;
}
document.querySelectorAll('span[role="img"].fa-image').forEach(function (el) {
let span = el;
while (el.tagName.toLocaleLowerCase() !== 'a') {
el = el.parentNode;
}
let url = el.href;
let imageElement = document.createElement('img');
imageElement.src = url;
imageElement.style['max-width'] = '500px';
span.appendChild(imageElement);
});
};
retryUntilSuccessFunction();
})();