Find Elements By Selector And Text Contains
Ezt a szkriptet nem ajánlott közvetlenül telepíteni. Ez egy könyvtár más szkriptek számára, amik tartalmazzák a // @require https://update.greasyfork.org/scripts/561472/1727895/findElementsBySelectorAndTextContains.js hivatkozást.
// ==UserScript==
// @name findElementsBySelectorAndTextContains
// @namespace Violentmonkey Scripts
// @version 1.0
// @description Find Elements By Selector And Text Contains
// @author maanimis
// @grant none
// ==/UserScript==
function findElementsBySelectorAndTextContains(selector, text) {
const elements = document.querySelectorAll(selector);
return Array.from(elements).filter(
(el) => el.textContent && el.textContent.includes(text)
);
}