Text Highlighter - Dynamic

Highlights User-defined Text

< 腳本Text Highlighter - Dynamic的回應

評論:正評 - 腳本一切正常

§
發表於:2020-08-08

Fails to work even on this very site with eg. words that are inside the script source window itself - eg. it works on, say, "script" as a word on this page but it does not work on the word "SITES" in the source code of the script itself, as displayed in the source code window.

§
發表於:2020-08-09

Hi, this script excludes preformatted (<pre>) elements. To work around that, you can edit the script. On the following line:

'and not(ancestor::pre)]',

change pre to something else like xyz:

'and not(ancestor::xyz)]',

And after you reload, the script should search inside <pre> elements.


More generally, I am not updating this old script. I may continue to update this newer one that has an option whether to search in pre elements:

https://greasyfork.org/en/scripts/13007-text-highlight-and-seek

§
發表於:2020-08-10

Thanks, that helps. I wouldn't have mentioned it at all if it was only about some quoted code but I saw similarly unaffected elements on some other page while testing, and that was going to be a problem, so I went looking for what else it doesn't work on, hence my post. And I do appreciate the swift reply.

發表回覆

登入以回覆