Download & Extend

Added a line to force an internal URL to a new window

Project:External New Tab
Version:6.x-1.8
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Kudos and thanks for creating External New Tab.

I modified external.js to force a new window to open based on a keyword in the URL. I had to do this because some of our page content is local to the site, but not integrated into Drupal. Yet.
Otherwise, the page leaves the Drupal environment and confuses the audience.
I inserted the following on line 28:
// Any URL with the word "sermon" in it opens in a new window.
$("a[href*=sermon]", context).click(externalNewWindow);

If you had copious free time, building a menu setup field for INCLUDING URLs (similar to EXCLUDING URLs) would be nice, but this little hack suffices whilst I migrate legacy scripts into Drupal.
Thanks again for writing clear, documented code.