+ 1

How can i find/replace HTML text with JS just like doing it with "right click-> inspect"

hi all, i'm using a Chrome JS extension (that executes after page is loaded) to change a word under a lot of tags in a web page but i can't reach that word or it's classname, so cuestion is, there is a way to find some text just like with plain text? and replace it? or i've to navigate between all tags looking for its class name? I wish i can do it just like when right clicking over that word and then inspect takes me to that exact HTML code in inspect window and then i can overwrite it Thanks in advance

7th Jan 2022, 6:42 PM
Fabian Labrunee
Fabian Labrunee - avatar
1 ответ
0
Fabian Labrunee You could search for it with RegEx, I suppose.
8th Jan 2022, 5:06 PM
Maisu
Maisu - avatar