tot - Difference in jquery/jquery.extlink.js versions 38 and 39
Not logged in
[Browse]  [Home]  [Login]  [Reports]  [Search]  [Timeline
  [History
Modified: jquery/jquery.extlink.js
===================================================================
--- jquery/jquery.extlink.js	2008-02-04 20:36:26 UTC (rev 38)
+++ jquery/jquery.extlink.js	2008-02-05 19:15:55 UTC (rev 39)
@@ -1,6 +1,6 @@
 /*
 **  jquery.extlink.js -- jQuery plugin for external link annotation
-**  Copyright (c) 2007 Ralf S. Engelschall <rse@engelschall.com> 
+**  Copyright (c) 2007-2008 Ralf S. Engelschall <rse@engelschall.com> 
 **  Licensed under GPL <http://www.gnu.org/licenses/gpl.txt>
 **
 **  $LastChangedDate$
@@ -13,12 +13,16 @@
             if (typeof color === "undefined")
                 color = "grey";
             var site = String(document.location)
-                .replace(/^(https?:\/\/[^:\/]+).*$/, "$1");
+                .replace(/^(https?:\/\/[^:\/]+).*$/, "$1")
+                .replace(/^((site)?(file:\/\/.+\/))[^\/]+$/, "$3")
+                .replace(/(\\.)/g, "\\$1");
             $("a", this).filter(function (i) {
+                var href = $(this).attr("href");
+                if (href == null)
+                    return false;
                 return (
-                      $(this).attr("href")
-                    ? ($(this).attr("href").match(RegExp("^("+site+"|(https?:)?/)")) != null)
-                    : false
+                       href.match(RegExp("^("+site+"|(https?:)?/[^/])")) == null
+                    && href.match(RegExp("^(https?|ftp)://.+")) != null
                 );
             }).each(function () {
                 $(this)