由于IMDB搜索不能排除特定类型,我想用Tampermonkey或Greasemonkey来隐藏我不感兴趣的那些。隐藏IMDB搜索的div
每部电影是一个名为"lister-item mode-advanced"
一个类中:
里面那就是:
<span class="genre">
Animation, Adventure, Family </span>
看着其他的答案,我想这样的事情可以工作:
// ==UserScript==
// @name NoAnimation
// @namespace NoAnimation
// @version 0.1
// @description try to take over the world!
// @author You
// @include *.imdb.com/search*
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js
// @grant GM_log
// @grant GM_getValue
// @grant GM_setValue
// @grant GM_addStyle
// @grant GM_openInTab
// @grant GM_xmlhttpRequest
// @grant GM_registerMenuCommand
// ==/UserScript==
$("lister-item mode-advanced") .show()
.has ("span.genre:contains('Animation')")
.hide();
哪些不起作用当然:(
我正在做这个测试akas.imdb.com/search/title?...。
我希望我已经够清楚了。任何人都可以给我建议吗? :)
欢迎的StackOverflow! 由于类定义缺失和测试数据,它像你的代码片段不正确。请尝试在你的问题上多挖一点,纠正信息 - 这将有助于回答你的问题 –
@StepanNovikov,对于Greasemonkey/Tampermonkey问题,公共目标页面的链接是黄金标准测试数据。 –