How to use Greasemonkey to remove a href block [duplicate]

a 夏天 提交于 2020-01-17 08:11:01

问题


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:


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();


来源:https://stackoverflow.com/questions/29205605/how-to-use-greasemonkey-to-remove-a-href-block

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!