UserJS.org

Linkify text files

Learn how to install scripts

Report a bug

This script improves display of text files by making URLs in text documents clickable.

Please note that the script only highlights URLs using the HTTP and FTP protocols.

Note that text pages do not contain <script> tags, so this script might not activate unless

[User Prefs]
Always Load User JavaScript=1

is used in the Opera6.ini. See how to install scripts for more details.

Instructions

The script has defined two keyboard shortcuts:

  • l (Small letter L) toggles line numbering on/off.
  • g prompts the user for a line number. Upon entering a valid line number, the display will scroll to that line and highlight it.

Version history

  • v1.4.1: Prevented an indent difference in Opera 9
  • v1.4.0: Fixed double-line-break bug and serious speed improvement.
  • v1.3.0: Yet another regression fix.
  • v1.2.9: Fixed regression in v1.2.8.
  • v1.2.8: Performance improvements.
  • v1.2.7: Improved URL detection.
  • v1.2.6: Fixed a bug that inserted blank lines on copy-paste operations.
  • v1.2.5: Added support for “Go to line number”. Press g and enter a number to go to that line.
  • v1.2.1: Fixed a few bugs.
  • v1.2: Added support for line numbers. Use l (small letter L) on the keyboard, or click the ⇔ widget to toggle line number visibility.
  • v1.1: Greatly improved URL replacement mechanism. Enabled script for a couple of other filetypes.