Delete table including arbitrary link

Discussion in 'Custom Filters' started by urum, Apr 13, 2019.

  1. urum

    urum New Member

    Joined:
    Apr 13, 2019
    Messages:
    2
    URL:
    https://crusherfactory.net/~yas_/blog/2014/04/post-163.php


    source:
    <table border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><div style="border:1px solid;margin:0px;padding:6px 0px;width:160px;text-align:center;float:left"><a href="https://hb.afl.rakuten.co.jp/hgc/12...l&amp;m=http://m.rakuten.co.jp/az-oil/n/se033" target="_blank"><img src="https://hbb.afl.rakuten.co.jp/hgb/?...il/cabinet/03183194/img77009078.jpg?_ex=80x80" alt="AZ チッコイグリースガン・自転車用グリス20gセット [自転車グリース・自転車グリス]" border="0" style="margin:0px;padding:0px"></a><p style="font-size:12px;line-height:1.4em;text-align:left;margin:0px;padding:2px 6px"><a href="https://hb.afl.rakuten.co.jp/hgc/12...l&amp;m=http://m.rakuten.co.jp/az-oil/n/se033" target="_blank">AZ チッコイグリースガン・自転車用グリス20gセット [自転車グリース・自転車グリス]</a><br><span style="">価格:617円(税込、送料別)</span><br></p></div></td></tr></table>







    ##[href*="afl.rakuten.co.jp"]

    I use a translator, but thank you. I want to delete the element including the optional href link for each upper table. Can you make such a filter?
     
  2. Blaz

    Blaz Moderator & Translator Staff Member Moderator

    Joined:
    Dec 21, 2014
    Messages:
    9,936
    Safe rule for products which support ext-CSS:
    Code:
    crusherfactory.net##.entry-content > table[border="0"] > tbody:has(a[href*="afl.rakuten.co.jp"])
    
    Unsafer rule for products which do not support ext-CSS:
    Code:
    crusherfactory.net##.entry-content > table[border="0"] > tbody
     
  3. urum

    urum New Member

    Joined:
    Apr 13, 2019
    Messages:
    2
    That's excellent!
    arigatou!
     
  4. vov

    vov New Member

    Joined:
    May 29, 2019
    Messages:
    7
    URL: http://keiichi78.blog88.fc2.com/blog-entry-1612.html?sp

    source: <table border="0" cellpadding="0" cellspacing="0"><tr><td valign="top"><div style="border:1px solid;margin:0px;padding:6px 0px;width:260px;text-align:center;float:left"><a href="http://hb.afl.rakuten.co.jp/hgc/12c...p;m=http://m.rakuten.co.jp/az-oil/i/10001365/" target="_blank"></a><p style="font-size:12px;line-height:1.4em;text-align:left;margin:0px;padding:2px 6px"><a href="http://hb.afl.rakuten.co.jp/hgc/12c...p;m=http://m.rakuten.co.jp/az-oil/i/10001365/" target="_blank">AZ CKM-001超極圧・水置換オイル 1L[超浸透防錆潤滑剤/多目的潤滑剤/多用途潤滑剤/…</a><br><span style="">価格:2,980円(税込、送料込)</span><br></p></div></td></tr></table>

    ##[href*="afl.rakuten.co.jp"]

    Hello everyone!
    Please. It is a similar situation. I want to make all tables including the link of "afl.rakuten.co.jp" invisible without exception for all sites regardless of domain.

    In addition, if you want to remove a table that contains the link "amazon.co.jp/****/****/*******-22" instead of "afl.rakuten.co.jp", how do you Should I describe it?
     
  5. Blaz

    Blaz Moderator & Translator Staff Member Moderator

    Joined:
    Dec 21, 2014
    Messages:
    9,936
    This rule will hide it on all sites (unless generichide is active on a site).
    Code:
    ##a[href*="afl.rakuten.co.jp"]
    Code:
    ##a[href*="amazon.co.jp/"][href*="-22"]
    
     
  6. vov

    vov New Member

    Joined:
    May 29, 2019
    Messages:
    7
    ## a [href * = "amazon.co.jp/"][href*="-22"]
    I learned that two things can be written like this. Thank you.
    Can I hide each upper table that contains these?
     
  7. Blaz

    Blaz Moderator & Translator Staff Member Moderator

    Joined:
    Dec 21, 2014
    Messages:
    9,936
    Yes, but it can be dangerous for generic usage and I do not recommend it.
     
  8. vov

    vov New Member

    Joined:
    May 29, 2019
    Messages:
    7
    Thank you. I want to know how to describe it for studying filters.
     
  9. Blaz

    Blaz Moderator & Translator Staff Member Moderator

    Joined:
    Dec 21, 2014
    Messages:
    9,936
    ##*:has(>a[href*="amazon.co.jp/"][href*="-22"])
     
  10. vov

    vov New Member

    Joined:
    May 29, 2019
    Messages:
    7
    I see! It is deep.
    Thank you for always replying!