From c7688fbf3c8de03e2583c8bf5aff8999c8ec3a95 Mon Sep 17 00:00:00 2001
From: martin <martin@siarp.de>
Date: Fri, 9 Oct 2009 14:33:31 +0200
Subject: [PATCH] make javascript not to add target=_blank but to use window.open

---
 elf.module |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/elf.module b/elf.module
index e50828c..07fd749 100644
--- a/elf.module
+++ b/elf.module
@@ -28,8 +28,13 @@ function elf_init() {
   if (variable_get('elf_window', FALSE)) {
     drupal_add_js('
       $(document).ready(function() {
-        // find all external links and set target to new window
-        $("a.external-link").attr("target", "_blank");
+        // find all external links and open in new window on click
+        $("a.external-link").each(function() {
+          $(this).click(function() {
+            window.open($(this).attr("href"));
+            return false;
+          });
+        });
       });
     ', 'inline');
   }
-- 
1.6.4.4

