美文网首页
Safari内容阻止规则-Safari Content-Bloc

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

作者: verge_l | 来源:发表于2018-08-09 11:23 被阅读0次

    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"]
     }
     }
    

    相关文章

      网友评论

          本文标题:Safari内容阻止规则-Safari Content-Bloc

          本文链接:https://www.haomeiwen.com/subject/szeqbftx.html