Find Elements By Selector And Text Contains
Този скрипт не може да бъде инсталиран директно. Това е библиотека за други скриптове и може да бъде използвана с мета-директива // @require https://update.greasyfork.org/scripts/561472/1727895/findElementsBySelectorAndTextContains.js
// ==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)
);
}