JournalSearch is an advanced search engine for your Roll20 campaign. It crawls all Handouts and Characters (including GM Notes) to provide a ranked list of results directly in a dedicated "Journal Search Results" handout. Code Key Features Ranked Relevance: Results are prioritized by where the term is found: Title matches first, followed by Header matches , and finally Body text matches . Phrase Support: Searching for "Ring of Warmth" finds the exact phrase, not just the word "ring." Contextual Snippets: Shows the search term with 3 words of context before and after. Deep-Linking: Each result includes a "Jump to Section" link that attempts to open the handout directly to the specific header where the match was found. Auto-Indexing: The script automatically re-indexes your journal whenever the sandbox restarts or a handout is edited. How to Use Search: Type !jsearch [your phrase] in the chat. Re-Index: Type !jindex to manually force a full crawl of your journal. Recommended Macro: Create a macro named "Search" with the following action to get a popup search box:
!jsearch ?{Search Term?} The "Double-Click" Quirk Due to how Roll20 handles asset loading, clicking a "Jump to Section" link sometimes only opens the handout to the top on the first try. If this happens, simply click the link a second time, and it will correctly scroll to the specific header/anchor. Link to Code