craiiz
V2EX  ›  问与答

Chrome 或 Firefox 有可以屏蔽知乎视频类回答的插件?

  •  
  •   craiiz · Sep 29, 2021 · 2474 views
    This topic created in 1717 days ago, the information mentioned may be changed or developed.
    如题,知乎的视频真的太恶心了
    5 replies    2022-07-06 13:28:46 +08:00
    Longerrrr
        1
    Longerrrr  
       Sep 29, 2021
    现写了一个

    ```javascript
    (function() {
    'use strict';

    // Your code here...
    setInterval( ()=>{
    let feeds = document.getElementsByClassName("Feed");
    for(let i = 0; i < feeds.length; i++ ) {
    let f = feeds[i];
    let att_str = f.getAttribute("data-za-extra-module")
    let att = JSON.parse(att_str)
    if (att.card && att.card.has_video) {
    f.parentElement.remove();
    console.log("remove")
    }
    }
    } , 500)

    })();
    ```
    lj2016
        2
    lj2016  
       Sep 29, 2021
    油猴 知乎增强
    craiiz
        3
    craiiz  
    OP
       Sep 29, 2021
    感谢两位大神!!已完美解决!@Longerrrr @lj2016
    MiketsuSmasher
        4
    MiketsuSmasher  
       Sep 29, 2021
    纯视频类内容(不是回答)很好解决,在 uBlock 的静态规则里面加上下面几行就解决了:
    www.zhihu.com##.ZVideoItem.ContentItem
    www.zhihu.com##.VideoContributionAnswer-container

    至于视频回答,还是要用脚本
    yagnqionggo
        5
    yagnqionggo  
       Jul 6, 2022
    写了 chrome 插件,屏蔽知乎推荐页视频
    https://github.com/yangqiong/chrome-plugins-zhihu-hidden
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2789 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 01:46 · PVG 09:46 · LAX 18:46 · JFK 21:46
    ♥ Do have faith in what you're doing.