Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

请问如何屏蔽整段的广告?

About: My Novel Reader

脚本超好用,感谢作者!

但是没有适配的网站有的广告不能去,比如  亲,点击进去,给个好评呗,分数越高更新越快
搜了一下通配符,尝试了 /n点击进去/n 这种,结果没用
网址如下
http://www.xbiquge.la/17/17377/8705070.html
最下面的广告,有两段

另外可以推荐一下脚本编写相关教程的网站吗?像稍微学习一下,自己改一改脚本,谢谢!

Comments

  • // @include        *://www.xbiquge.la/*/*/*.html
    
    {siteName: '新笔趣阁xbiquge',
        url: '^https?://www\\.xbiquge\\.la/\\d+/\\d+/\\d+\\.html',
        bookTitleSelector: '.con_top a:nth-of-type(3)',
        titleSelector: '.bookname h1',
        contentSelector: '#content',
        contentReplace: [
            '亲[,,]点击进去.*',
            '手机站全新改版.*',
            '',
        ],
    },
    
  • edited June 2 [?]

    @akiba9527
    楼上的代码优化为:

    {
        siteName: '新笔趣阁xbiquge',
        url: /^https?:\/\/www\.xbiquge\.la(\/\d+){3}\.html/,
        bookTitleSelector: '.con_top a:nth-of-type(3)',
        titleSelector: '.bookname h1',
        contentReplace: [
            '亲[,,]点击进去.*',
            '手机站全新改版.*',
        ],
    },
    

    还可再简化为

    {
        siteName: '新笔趣阁',
        url: /^https?:\/\/www\.xbiquge\.la(\/\d+){3}\.html/,
        contentReplace: [
            '亲[,,]点击进去.*',
            '手机站全新改版.*',
        ],
    },
    
  • 谢谢大佬的代码!

Sign In or Register to comment.