How to use Greasemonkey to remove a href block [du

2019-08-27 02:38发布

This question already has an answer here:

I'm trying to remove the following line of code from http://trakt.tv/calendars/my/shows/ using Greasemonkey:

<a href="/vip">
    <div class="huckster-vip-square">
        <div class="inner">
            <div class="text">
                <h1>Support Trakt & become a VIP!</h1>
                <h2>Hide advertising, unlock extended features and help Trakt grow.</h2>
                <div class="btn btn-primary">Learn More</div>
            </div>
        </div>
    </div>
</a>

How can I do that?

1条回答
forever°为你锁心
2楼-- · 2019-08-27 03:24

You may try it with jQuery. Please refer to this question for using jQuery in Greasemonkey.

The JavaScript code would be like:

$("a[href='/vip']").remove();
查看更多
登录 后发表回答