Permalink
Browse files

Add target blank to external title links

  • Loading branch information...
1 parent 6807dd6 commit 1166449d62b1ca65cd0c4a72e5660e174cea2257 @jphpsf committed Oct 21, 2009
Showing with 7 additions and 2 deletions.
  1. +6 −1 themes/yui/web/index.php
  2. +1 −1 themes/yui/web/item.php
View
@@ -51,6 +51,11 @@
$('body').click(function(e){
var $target=$(e.target);
+ if ($target.is('a') && $target.attr('target')==='_blank') {
+ $target=null;
+ return;
+ }
+
if ($target.not('div.item') && $target.not('a') && $target.parents('div.item').size()==1) {
$target=$target.parents('div.item');
}
@@ -78,7 +83,7 @@
}
}
$target=null;
- });
+ })
});
})();
// ]]>
View
@@ -1,7 +1,7 @@
<div class="item">
<?php rss_plugin_hook("rss.plugins.items.beforetitle", rss_item_id()); ?>
<div class="item-title" id="i<?php echo rss_item_id(); ?>">
- <a href="<?php echo rss_item_url(); ?>" class="item_url"><?php echo rss_item_title(); ?></a>
+ <a href="<?php echo rss_item_url(); ?>" class="item_url" target="_blank"><?php echo rss_item_title(); ?></a>
<em>(<?php echo rss_item_date(); ?> <?php echo rss_item_author(); ?>)</em>
</div>
<div class="item-body" style="display:none">

0 comments on commit 1166449

Please sign in to comment.