Please help with a custom filter

Everything about using Adblock Plus on Google Chrome
Post Reply
PashkaABP
Posts: 1
Joined: Sat Apr 29, 2023 7:52 am

Please help with a custom filter

Post by PashkaABP »

Hello guys,
On twitch.tv if I block a user, I still will get annoying messages:

User Hidden:
<message hidden from blocked user>

Here's an example html:

Code: Select all

<div class="chat-line__message" data-a-target="chat-line-message" data-a-user="patchessc" tabindex="0" align-items="center">
	<div class="Layout-sc-1xcs6mc-0 bZVrjx">
		<div class="Layout-sc-1xcs6mc-0 bZVrjx chat-line__message-container">
			<div class="Layout-sc-1xcs6mc-0">
				<div class="Layout-sc-1xcs6mc-0 cZxfJz chat-line__no-background">
					<span class="chat-line__username--hidden" data-a-target="chat-hidden-username-placeholder">
						<button class="ScCoreLink-sc-16kq0mq-0 jGftDI tw-link">User Hidden</button>
					</span>
					<span aria-hidden="true">: </span>
					<span class="chat-line__message--hidden" data-a-target="chat-hidden-message-placeholder">
						<button class="ScCoreLink-sc-16kq0mq-0 jGftDI tw-link" style="display: none !important;">&lt;message hidden from blocked user&gt;</button>
					</span>
				</div>
			</div>
		</div>
		<div class="Layout-sc-1xcs6mc-0 vNVsi chat-line__icons">
			<div class="Layout-sc-1xcs6mc-0 gFnnYr chat-line__reply-icon">
				<div class="InjectLayout-sc-1i43xsx-0 dVOhMf">
					<button class="ScCoreButton-sc-ocjdkq-0 ibtYyW ScButtonIcon-sc-9yap0r-0 iqxxop InjectLayout-sc-1i43xsx-0" aria-label="Click to reply">
						<div class="ButtonIconFigure-sc-1emm8lf-0 bxQRSJ">
							<div class="ScIconLayout-sc-1q25cff-0 cMWGQu">
								<div class="ScAspectRatio-sc-18km980-1 hTTohL tw-aspect">
									<div class="ScAspectSpacer-sc-18km980-0 kiiGFY"></div>
									<svg width="100%" height="100%" version="1.1" viewBox="0 0 20 20" x="0px" y="0px" class="ScIconSVG-sc-1q25cff-1 dSicFr"><path d="M8.5 5.5L7 4L2 9L7 14L8.5 12.5L6 10H10C12.2091 10 14 11.7909 14 14V16H16V14C16 10.6863 13.3137 8 10 8H6L8.5 5.5Z"></path></svg>
								</div>
							</div>
						</div>
					</button>
				</div>
			</div>
		</div>
	</div>
</div>
I want to hide the whole "div.chat-line__message" if it has a descendant button (anywhere) that contains text "message hidden from blocked user".

I tried

Code: Select all

twitch.tv#?#:div.chat-line__message button:-abp-contains(message hidden from blocked user)
twitch.tv#?#:div.chat-line__message span:-abp-has(button:-abp-contains(message hidden from blocked user))
to no avail
Post Reply