noob here, I want to hide the entire div using Tampermonkey when it contains "Promoted" under span,
<div>
<div class="relative">
<div class="ember-view occludable-update ">
<span aria-hidden="true">Promoted</span>
<span class="visually-hidden">Promoted</span>
</div>
</div>
</div>
I did try based on my finding as below but didn't get it working, any help would be a greatly help, many thanks
// ==UserScript==
// @name LinkedIn Ad block
// @namespace http://tampermonkey.net/
// @version 0.4
// @description I always want my LinkedIn feed in chronological order!
// @include https://linkedin.com/*
// @include https://www.linkedin.com/*
// @exclude https://www.linkedin.com/tscp-serving/*
// @grant none
// @run-at document-idle
// @require https://gist.githubusercontent.com/BrockA/2625891/raw/9c97aa67ff9c5d56be34a55ad6c18a314e5eb548/waitForKeyElements.js
// ==/UserScript==
('div.relative.ember-view:has(span:contains("Promoted"))').remove();
Here is a sample code that you can work on and update to suit your requirement: