Use Tampermonkey for this one
Delastelle#HXXAuB
09/28/2024 (Sat) 06:54
No.101313
del
If you guys want to bypass the filters on Endchan, I'm also working on new CSS and custom userscripts to make this place usable since no one is leaving Endchan as it seems:
// ==UserScript==
// @name Bypass word filters
// @namespace http://tampermonkey.net/
// @version 2024-09-26
// @description try to take over the world! but fails miserably
// @author You, yes, you
// @match https://endchan.gg/*
// @match https://endchan.org/*
// @match https://endchan.net/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=endchan.org
// @grant none
// ==/UserScript==
const REPLACEMENTS = {
'A': 'А',
'E': 'Е',
'O': 'О',
'a': 'а',
'e': 'е',
'i': 'і',
'o': 'о',
'y': 'у',
'P': 'Р',
'p': 'р',
};
const field_message = document.querySelector('#fieldMessage');
function replaceText(text) {
return text.replace(/[AEOaeiop]/g, (char) => REPLACEMENTS[char] || char);
}
function replaceTextareaOnInput(textarea) {
textarea.addEventListener('input', () => {
const start = textarea.selectionStart;
const end = textarea.selectionEnd;
const originalLength = textarea.value.length;
textarea.value = replaceText(textarea.value);
const newLength = textarea.value.length;
const lengthDifference = newLength - originalLength;
textarea.setSelectionRange(start + lengthDifference, end + lengthDifference);
});
}
if (field_message) {
replaceTextareaOnInput(field_message);
}