From: Sarven Capadisli Date: Sun, 14 Mar 2010 18:06:14 +0000 (-0400) Subject: Updated plugin to open external links on a new window that are not X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=6e5e75f341fde6f4ef6b0ad01b38a85bd9583a30;p=quix0rs-gnu-social.git Updated plugin to open external links on a new window that are not attachments --- diff --git a/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php b/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php index ebb0189e03..6756f19930 100644 --- a/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php +++ b/plugins/OpenExternalLinkTarget/OpenExternalLinkTargetPlugin.php @@ -45,7 +45,7 @@ class OpenExternalLinkTargetPlugin extends Plugin { function onEndShowScripts($action) { - $action->inlineScript('$("a[rel~=external]").click(function(){ window.open(this.href); return false; });'); + $action->inlineScript('$("a[rel~=external]:not([class~=attachment])").live("click", function(){ window.open(this.href); return false; });'); return true; }