Greasy Fork is available in English.

Text Highlight and Seek

Automatically highlight user-defined text with Seek function (2019-09-22)

< Text Highlight and Seekについてのフィードバック

レート:良 – スクリプトは良好に動作する

§
投稿日: 2018/10/10

Conditional highlight

Hello, how can I change this script for it to only activate a set if it find the first word in that set. Or to activate the set if it find a specific word on the site?

§
投稿日: 2018/10/11

Hi Daniel, currently, the entire set is checked in one step using Regular Expressions for each piece of text. So the script doesn't keep track of what was found, it just marks as it goes.

I don't know RegEx well enough to say whether there is an easy way to pre-check for a particular word across the entire document before doing any highlighting. The cumbersome way would be to use an additional loop similar to lines 396-399 to pre-check whether the word is in the document before proceeding with the actual highlighting.

返信を投稿

返信を投稿するにはログインしてください。