Permalink
Browse files

prettier feeling lucky url

  • Loading branch information...
1 parent 8a690ae commit 4828395ca9677fd9dd6f6243421434fd920ffb3e @kyupark committed Sep 14, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lucky.js
View
@@ -1,11 +1,11 @@
$(document).ready(function() {
$('em').each(function() {
- var text = String($(this).text()).split('-').join('+');
+ var text = String($(this).text()).split('-').join('').split(' ').join('+');
var url = 'http://www.google.com/search?btnI&q=site:youtube.com+' + text;
$(this).html('<a href="' + url + '">' + $(this).text() + '</a>');
});
$('strong').each(function() {
- var text = String($(this).text()).split('-').join('+');
+ var text = String($(this).text()).split('-').join('').split(' ').join('+');
var url = 'http://www.google.com/search?btnI&q=' + text;
$(this).html('<a href="' + url + '">' + $(this).text() + '</a>');
});

0 comments on commit 4828395

Please sign in to comment.