Link alert

  • Published: 2006-03-21 18:12
  • Modified: 2006-03-22 08:35
  • Author: TarquinWJ
  • Requires: Opera 8.0
  • Install as: Opera User JS

Learn how to install scripts

Report a bug

This script identifies links to specific file types, and displays an appropriate icon when the link is hovered. It can also display appropriate icons for specific types of links, such as links that open new windows, or run scripts.

The script has a few options that allow you to choose:

  • If the icons should appear only when the link is hovered, or if they should always be visible.
  • If the icons should appear if the link already contains an image.
  • If the icons should appear if the link does not contain any text.
  • If you want the script to show icons or text.
  • If the icons should disappear after a few seconds (only if you also use the hover option).

Additionally, you can configure what file and link types you want to see icons for, what file extensions or link protocols to match, and what icons to use.

Note that the script works by checking the file extensions of the links. It does not try to retrieve the file to check if it is actually what it claims to be, and it does not check to see if server-side scripts are serving known file types indirectly. However, it does work for the majority of links.

The following link types can be detected (note that these links do not point to real files, they are just there so you can test the script):

Please note, that in an effort to help search engines, all of the links here have the rel="nofollow" attribute set, and some modified setups of LinkAlert might therefore show two icons.

* Some links may show two 'JavaScript link' icons - this is intentional, as it shows that the link has script in both the href and onclick attributes. This is an indicator that, even if you can understand the script you see in the tooltip, it still might do something else when you click it.

Version history

  • 1.1.5: Fixed the script for Opera 9 TP 2 and changed RSS icon
  • 1.1.4: Improvements to handling of hover effect - avoids conflicting with sites
  • 1.1.3: Added a few more OpenOffice extensions, and icons for PostScript and TeX
  • 1.1.2: Allowed the script to run on pages that use minimised markup
  • 1.1.1: Attempt to avoid page content jumping in Opera 9 when hovering links - see script source for details
  • 1.1:
    • Added timeout option that can hide the icons after a specified number of seconds
    • Added more icons, extensions, and protocols (extra icons thanks to xErath)
    • Fixed a positioning bug with certain pages
  • 1.0.5: Added text-only option, and fix for icons remaining visible after hover
  • 1.0.4: Allowed the script to pick up a few more links if they are created after the page has loaded
  • 1.0.3: Fixed a layering problem that caused the icons to be hidden by page content
  • 1.0.2: Added an icon for .torrent files
  • 1.0.1: Fixed a positioning bug when clicking a link

This script was inspired by the TargetAlert Firefox extension, but was written independently to work with Opera's User JavaScript. Icons are the property of their respective copyright holders.