melonpunk@lemmy.worldtoLemmy Support@lemmy.ml•How to remove a single button from the tool bar?English
2·
1 year agoThis will hide the button from display so it cannot be clicked on.
document.querySelector("[data-tippy-content='upload image']").style.display = "none";
To test it you can just put it into the browser console (F12), but adding it to an instance will require it to be added to a javascript file that’s loaded and run on page open.
It’s not the most ideal way of removing the feature, but it depends on what you’re needing your instance to do. If it’s just a personal instance, then I guess you could just run this line via a browser extension such as Greasemonkey, which would remove it in your client browser (not on the instance itself).