Conversaciones » Desarrolladores
Removing form buttons from a phpbb forum reply editor
// ==UserScript==
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle('[name="addbbcode24"],[name="addbbcode26"]{display:none}'}
Thanks! It even works in `Ferdium` (replacing `GM_addStyle` with the function from https://stackoverflow.com/a/46285637/1460868).
I'd like to remove or disable a couple of buttons from the reply editor of a phpbb forum I'm a member of, because the bbcodes they insert are too tempting but for some reason reserved for "more mortals".
Removing is probably the easiest solution; I have already identified what code to remove to achieve this:
In the old days I would do this via a filter in
Privoxy
but nowadays that requires setting up itshttps_inspection
, which I'd prefer to avoid.I think it should be possible to do this via an in-browser userscript. I found a promising JS function on here (https://stackoverflow.com/a/50537862/1460868) but have little idea for now how to deploy it (I have no knowledge of Javascript):
node.textContent.replace()
; does it take simple expression (if so, how to pass a multi-line pattern?) or a regexp (and if so, what flavour)?Thanks in advance!