Safari内容阻止规则-Safari Content-Bloc

2018-08-09  本文已影响0人  verge_l

1.通过ID或则class隐藏节点

{
  "action": {
       "type": "css-display-none",
        "selector": "#newsletter, div.ads,:matches(.main-page, .article) .news-overlay"
    },
    "trigger": {
        "url-filter": ".*",
        "resource-type": ["image", "style-sheet"],
        "if-domain": ["your-block-server.com", "no-trusted-content-server.com"],
        "unless-domain": ["your-content-server.com", "trusted-content-server.com"]
    }
}

2.禁止某个网站加载第三网网站的script或者其它资源

 {
 "action": {
 "type": "block"
 },
 "trigger": {
 "url-filter": ".*",
 "resource-type":["script"],
 "load-type":["third-party"],
 "if-domain":["m.xxshu5.com","m.huanyue123.com","m.mxguan.com","m.x23us.com","m.shuquge.com"]
 }
 }
 {
 "action": {
 "type": "block"
 },
 "trigger": {
 "url-filter": ".*",
 "if-domain":["www.biqudu.com"],
 "resource-type":["image","script"],
 "load-type":["third-party"]
 }
 }
上一篇下一篇

猜你喜欢

热点阅读