typeof(HighlightedWords[TextRange.text + "~"]) == "undefined") { // Record text highlighted for this expression // NewHighlightedWords[TextRange.text + "~"] = true; // Try to trim off trailing whitespace or .s // LastCharTextRange = TextRange.duplicate(); LastCharTextRange.moveStart("character", TextRange.text.length - 1); if ((LastCharTextRange.text == " ") || (LastCharTextRange.text == ",") || (LastCharTextRange.text == ".")) { // Prevent infinite loops if search is for "," or "." // if (LastCharTextRange.text != LongestWordExpression) { TextRange.moveEnd("character", -1); } } // Highlight words in text range // TextRange.execCommand("ForeColor", false, WWHFrame.WWHHelp.mSettings.mHighlightingForegroundColor); TextRange.execCommand("BackColor", false, WWHFrame.WWHHelp.mSettings.mHighlightingBackgroundColor); if (bFirstMatch) { TextRange.scrollIntoView(); bFirstMatch = false; } bMatchFound = true; } } ExpressionIndex++; } TextRange.collapse(false); } // Add highlighted words to hash // for (NewHighlightedWordsKey in NewHighlightedWords) { HighlightedWords[NewHighlightedWordsKey] = true; } } } } // Highlight words only once // this.mWordList = null; } function WWHHighlightWords_ExpressionHash_Object() { } function WWHHighlightWords_ExpressionEntry_Object() { this.mExpressions = new Array(); } function WWHHighlightWords_HighlightedWords_Object() { } ル