How do I make a Tampermonkey script that removes content?
3 replies, posted
Say I wanted to remove the post icons column every time I loaded FP rather than deleting the node in inspect element each time, or I wanted to remove some headers or footers like toolbars and copyright text from my favourite sites, albeit this will increase page load time. It sounds easy, but how would I go about it? Is there a better way than a Tampermonkey script?
I tried looking at other scripts that remove stuff but I just don't get it.
i assume you just do some javascript to remove the node, like document.getElementsByClass() or ById then remove it or change its css to display: none (probably better/safer)
You would probably find it easier to do something like what you gave as an example through Stylish or another alternative addon that affect's a site's CSS. For example the post icons could be removed simply by putting this code into Stylish:
[code].threadicon { display:none; }[/code]
If you wanted to remove that column as well as the header and footer like in your example you could do this:
[code].threadicon, .footer, #header { display:none; }[/code]
[t]http://i.imgur.com/4DiiVLq.png[/t]
damn that was easy, thanks a lot.
Sorry, you need to Log In to post a reply to this thread.