MooTools 1.2 OpenLinks Class

Each link below is analyzed to see if the file extension in the HREF is in the list of specified file extensions to be opened in a new window. If there's a match, the anchor's target is opened in a new window if the anchor does not have the specified no-target class.

Note: for the sake of this example, I've made the links that will open in a new window red.

Some PDF

Some Word DOC

Some Other File 1

Some Other File 2

Some Excel XLS

Some Other File 3

Some Image JPG

Some Excel XLS (upper-case file extension -- still works!)

Some Excel XLS (special class to not modify target)