Enhanced word highlight

Enhanced keywords highlight for Search Engines and All !

Author
hzhbest
Daily installs
2
Total installs
10,595
Ratings
131 3 1
Version
1.8.5
Created
2014-12-31
Updated
2024-03-18
License
GNU GPLv3
Applies to
All sites

A powerful word highlight script that can do more than highlight.

Intro

Enhanced word highlight (Ewh) is the enhanced version of "word highlight" script (see more in "Credit"). Its features include:

  1. Highlight search keywords: Automatically highlight search keywords in result pages of Google, Bing, etc., as well as in the pages opened from search result links;
  2. Inheriting highlight: Highlighted keywords will also be auto-highlighted in the same session, for example, subsequent pages in the same browser tab;
  3. Manual highlight: Pressing "Alt-/" key combination, selected text will be instantly highlighted; otherwise, an keyword inputbox will show for you to input keywords (support regular expression) for highlight;
  4. Highlight map: It can show the position of highlighted keywords and let you quickly navigate to where they are;
  5. Keyword button: On a keyword button, clicking left or right mouse buttons or scrolling will instantly navigate to the keyword's highlight positions; clicking the checkbox at the upper-right corner can toggle its highlight status;
  6. Control buttons: Clicking the "L" button to toggle keyword set's locking status; clicking the "O" button to toggle all keyword's highlight status; clicking the "E" button to edit keyword set; clicking the "X" button to close Ewh;
  7. Refresh highlight automatically as the webpage changes;
  8. Plenty options to fit your usage demand;
  9. More highlight color set for your selection.

Preview of Ewh in action

->Ewh full interface (when hovering on highlight panel)

->navigating to highlights (scrolling on a keyword button)

->extrime slim highlight panel style

Usage outline

  • Please use space to seperate each keyword for highlight; East Asian characters will be automatically seperated from other characters by default (changable in Advanced Config).
  • If you have to highlight a keyword containing space, plus symbol etc., you should add double quotation marks around the keyword.
  • If you want to highlight regular expressions, please input through keyword inputbox, with one complete expression at one time.
  • Default key combination shortcut:
    • Alt-/ (the left slash key):
      • (when text selected outside of any inputbox) highlight selected text,
      • (when an inputbox is in focus) highlight text in the inputbox,
      • (no selected text and no inputbox in focus) pop out keyword inputbox;
    • Alt-, (comma key): toggle all keywords highlight status;
    • Alt-.(dot key): toggle keyword editing status;
    • Ctrl-Alt-/ : exit Ewh in current session;
    • r key: refresh highlight manually;
    • n key: sequentially navigate to each highlight of any keyword in the page;
    • Shift-n: do the similar job as n key but in backward sequence.
  • After exiting Ewh in a session, subsequent search keywords or locked keywords will still be highlighted in this session.
  • When some keywords are locked for highlight, any page refreshed afterward will priorly highlight locked keywords; editing keywords will not affect the locking status if "L" button is not clicked; the locking status can only be turned off by clicking the "L" button.
  • If you use any Greasemonkey compatible script manager, you can find a menu item "Advanced Config" of Ewh in its menu. You can click this menu item and modify Ewh config in the pop-up dialog to your preference.
  • Issues to be noticed:
    • You are recommended to use Tampermonkey addon / extension to gain full experience of Ewh.
    • Some autopaging or readability tools will function in a way that would break the continuity of a session, thus making highlight to vanish or unable to auto-refresh. If so, you will have to manually refresh highlight or re-input keywords for highlight.
    • Under Firefox, its safety mechanism forbid some pages to apply some third-party script functions, letting Ewh unable to run within.

Donation

If you find this script really help you, please consider to make a donation. => Buy me a milky tea

Thanks!

Credit

This script cannot be born without the original script (Version 1.0.9) by os0x. Thank grea for code and idea contribution. And many who offer tips, ideas, references and suggestions.

Update Log

  • 2010.08.15: Version 1.5.0: Add support for more search sites other than Google, as well as their subsequent pages; add config option to disable auto-highlight in search result pages; add in-code config for restore focus after using Esc key exiting keyword input; change behavior, pressing Ctrl-/ when focused in keyword inputbox will close the box; fix behavior, now quoted keywords can sustain; code refinement; since I have to add encoding convertion functions to handle Baidu keywords, the size of the script grows significantly.
  • 2010.11.30: Version 1.5.5: Behavior change: pressing Ctrl-./ when text is selected outside of text input area now will instantly add selected text as keywords to highlight; "Add/New" keyword input status will last until web page refresh; when highlight is disabled, existing keywords now will not automatically be added to the new keywords for highlight in the same window / tab, but by pressing Ctrl-/ without selecting text, they will be shown in the keyword inputbox; period dot is no longer a keyword separator; quoted keywords now work properly (finanlly); Add external calling code (for like mouse gesture) "content.window.wrappedJSObject.EWH_iSearch();" to call the keyword inputbox; Other bug fixes and code improvement.
  • 2010.12.02: Version 1.5.5a: Fix a bug that cause an error that halt the script when running in non-GM environment; Fix a bug that cause keyword cleaning-up failure in some circumstances; Add external calling code (for like mouse gesture) "content.window.wrappedJSObject.EWH_cClose();" to call the disable-highlight command.
  • 2010.12.16: Version 1.5.6: Fix and improve the function to toggle all highlight, which makes it work under Opera (11 beta); Add a button to lock highlight map; Behavior change: now on non main-search-engine pages, inherited keywords will have higher priority.
  • 2011.06.19: Version 1.5.7: Add support to new addon.mozilla.org search pages; Refine styles; Behavior change: now you can only move the panel by dragging the left handler; Behavior change: now you cannot drag the panel when it's minimized; Add an option in code to provide initial-minimized-state panel for auto-highlight; Add a line to improve language determination (thanks SoIN); Change the shortcut keys to activate the keyword inputbox: Alt-/ to activate, while Alt-. (that is Alt and Period) to edit keywords.
  • 2011.07.20: Version 1.5.7a: Fix the key shortcut problem, now the shortcut for editing keyword work, and the shortcut for toggling all highlight changed to Alt-, ; Refine style; Enable the script to work in iframes (test); other small fixes.
  • 2011.11.10: Version 1.5.7b: Fix the keyword getting issue for Google's redirection.
  • 2017.09.22: Version 1.5.9: Fix Baidu Charset problem.
  • 2017.09.22: Version 1.6.0: Add exclusion to https Googld Map.
  • 2022.01.15: Version 1.6.2: Thanks to YFdyh000, shortcut keys work again in new versions (36+) of Firefox.
  • 2022.02.03: Version 1.6.3: Fix the problem that highlight map didn't respond to mouse click in new versions (36+) of Firefox.
  • 2022.02.03: Version 1.6.4: Add fade-out effect to the indicator-bar; fix a layout problem of the config dialog in some webpages; add a primitive skip-word-list that store the words the user don't need to highlight.
  • 2023.01.05: Version 1.6.5; Modify panel style; add support to more search sites.
  • 2023.01.11: Version 1.6.6: Fix iframe hide mechanism in Microsoft Rewards; press Alt-/ in an inputbox will also instant highlight the content in the inputbox; style refine; new remove highlight method.
  • 2023.01.29: Version 1.7.0: Fix new remove highlight method conflict with hover dict in Bing International; Fix map viewport position problem when the page viewing width is larger than window view; Add DuckDuckGo support; Fully rebuild the Advanced Config dialog.
  • 2023.01.30: Version 1.7.1: Fix bug that highlighting didn't stop in autopaging after highlight was disabled; Pause highlight renewal when navigating highlight using mousewheel; Navigating highlight using mousewheel works in Chrome-like browsers; Add Greasyfork support; new remove highlight method.
  • 2023.04.24: Version 1.7.2: Fix highlighting "false" when no search keyword found in some cases; add engine Ecosia; fix running error in some newly installed cases.
  • 2023.05.05: Version 1.7.3: Fix getting keywords from Baidu; update panel design.
  • 2023-05-23: Version 1.7.4: Refine design; pressing "ESC" key in keyword inputbox now can close the keyword inputbox, again.
  • 2023-10-26: Version 1.7.5: Fix long-history highlighting bug; Fix word count abnormality when skipping keyword(s); Now highlight the element where invisible highlighted keywords lay.
  • 2023-12-29: Version 1.8.0: Add: abilibty to highlight keywords from supported search engines by last click on link, to enable highlighting search keywords from https search engines; Add: get keywords dynamically, in case webpage been renewed without refreshing; fix configbox visual abnormality; fix style; add delay for title for better highlighting.
  • 2024-01-06: Version 1.8.1: Add highlight rules for bili and xigua; allow off highlight while keeping keywords initially; improve off highlight mechanism.
  • 2024-03-10: Version 1.8.2: Refine highlight navigation mechanism; refine display style; add extreme slim style to highlight panel; fix bug that not saving changed skipped keywords.
  • 2024-03-13: Version 1.8.3: Refine config style; fix bug in skip-short-word-highlight.
  • 2024-03-17: Version 1.8.4: Fix bug not showing Advanced config dialog in some page.
  • 2024-03-18: Version 1.8.5: Fix keywords from links cleaning mechanism; fix highlight mis-refreshing with no initial highlight; improve highlight refreshing mechanism when scrolling; add floating tip when changing global highlight status; add several highlight color selections.