Skip to content

Commit

Permalink
Add new element hiding rules when filtering is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kiwibrowser authored Oct 23, 2020
1 parent bcf64ad commit 8da1b3f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions third_party/blink/renderer/core/layout/layout_object.cc
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,28 @@ LayoutObject* LayoutObject::CreateObject(Element* element,
|| element->getAttribute(HTMLNames::classAttr).Contains("inlineOverlay")
|| element->getAttribute(HTMLNames::classAttr).Contains("inlinePopup")
|| element->getAttribute(HTMLNames::classAttr).Contains("popup_tosEdition")
|| element->nodeName() == "ytm-companion-slot"
|| element->nodeName() == "ytd-companion-slot-renderer"
|| element->nodeName() == "ytd-promoted-sparkles-web-renderer"
|| element->nodeName() == "ytd-single-option-survey-renderer"
|| element->getAttribute(HTMLNames::classAttr).Contains("ytd-display-ad-")
|| element->getAttribute(HTMLNames::classAttr).Contains("masthead-ad")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytd-companion-slot-renderer")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytd-video-masthead-ad-v3-renderer")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytm-promoted-sparkles-text-search-renderer")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytm-promoted-sparkles-web-renderer")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-image-overlay")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytd-action-companion-ad-renderer")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-overlay-container")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-progress")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytd-carousel-ad-renderer")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytd-player-legacy-desktop-watch-ads-renderer")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytd-promoted-sparkles-text-search-renderer")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytd-search-pyv-renderer")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-message-container")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytp-ad-player-overlay-flyout-cta")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytp-paid-content-overlay-text")
|| element->getAttribute(HTMLNames::classAttr).Contains("ytp-paid-content-overlay-text")
|| element->getAttribute(HTMLNames::typeAttr).Contains("24smi")
|| element->getAttribute(HTMLNames::typeAttr).Contains("a8")
|| element->getAttribute(HTMLNames::typeAttr).Contains("a9")
Expand Down

0 comments on commit 8da1b3f

Please sign in to comment.