<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>_clipboard.swf</filename>
    </added>
    <added>
      <filename>artwork/copy_button.psd</filename>
    </added>
    <added>
      <filename>artwork/copy_message.psd</filename>
    </added>
    <added>
      <filename>images/copy_button.png</filename>
    </added>
    <added>
      <filename>images/copy_button_hover.png</filename>
    </added>
    <added>
      <filename>images/copy_message.png</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -32,6 +32,27 @@
   };
 })(jQuery);
 
+(function($) {
+  $.sendToClipboard = function(text) {
+    var copier = $(&quot;#flash_copier&quot;);
+    if (copier.size() == 0) {
+      copier = $('&lt;div id=&quot;flash_copier&quot;&gt;&lt;/div&gt;').appendTo(&quot;body&quot;)
+    }
+    copier.html('&lt;embed src=&quot;_clipboard.swf&quot; FlashVars=&quot;clipboard='+encodeURIComponent(text)+'&quot; width=&quot;0&quot; height=&quot;0&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;')
+  };
+})(jQuery);
+
+(function($) {
+  $.fn.centerOver = function(element) {
+    var self = this;
+    self.css({
+      top: (element.position().top + element.outerHeight()/2 - self.height()/2).px(),
+      left: (element.position().left + element.outerWidth()/2 - self.width()/2).px()
+    });
+    return self;
+  };
+})(jQuery);
+
 // http://keith-wood.name/localisation.html
 // Localisation assistance for jQuery v1.0.2.
 // Written by Keith Wood (kbwood@iprimus.com.au) June 2007.
@@ -146,7 +167,12 @@ LMGTFY.lang = {
     step_1: &quot;Step 1: Type in your question&quot;,
     step_2: &quot;Step 2: Click the Search button&quot;,
     pwnage: &quot;Was that so hard?&quot;
-  }
+  },
+
+  url: {
+    copied:    &quot;URL copied to clipboard&quot;,
+    shortened: &quot;TinyURL copied to clipboard&quot;
+  },
 }
 
 // app code
@@ -158,6 +184,9 @@ $(function(){
   var fakeMouse    = $(&quot;#fake_mouse&quot;)
   var instructions = $(&quot;#instructions &gt; div&quot;)
   var button       = ($.getQueryString({ id: &quot;l&quot; }) == &quot;1&quot;) ? $(&quot;#lucky&quot;) : $(&quot;#search&quot;)
+  var inputLink    = $(&quot;#link input.link&quot;)
+  var copyButtons  = $(&quot;#copy_buttons&quot;)
+  var copyMessage  = $(&quot;#copy_message&quot;)
 
   if (searchString &amp;&amp; searchString.length &gt; 0) googleItForThem()
   else getTheSearchTerms()
@@ -190,14 +219,22 @@ $(function(){
 
   function linkifyAbout() {
     $(&quot;#about p&quot;).each(function() {
-      $(this).html($(this).text().replace(/(@([a-zA-Z0-9]+))/g, '&lt;a href=&quot;http://twitter.com/$2&quot;&gt;$1&lt;/a&gt;'))
-    })
+      $(this).html($(this).text().replace(/(@([a-zA-Z0-9]+))/g, '&lt;a href=&quot;http://twitter.com/$2&quot;&gt;$1&lt;/a&gt;'));
+    });
   }
 
   function instruct(langkey) {
-    var keys = langkey.split(/\./)
-    var value = keys.length == 1 ? LMGTFY.lang[keys[0]] : LMGTFY.lang[keys[0]][keys[1]]
-    instructions.html(value)
+    instructions.html(langString(langkey));
+  }
+
+  function copyStatus(langkey) {
+    copyMessage.html(langString(langkey)).show().centerOver(inputLink);
+    setTimeout(function(){ copyMessage.fadeOut(1500) }, 1000);
+  }
+
+  function langString(langkey) {
+    var keys = langkey.split(/\./);
+    return keys.length == 1 ? LMGTFY.lang[keys[0]] : LMGTFY.lang[keys[0]][keys[1]];
   }
 
   function getTheSearchTerms() {
@@ -216,14 +253,40 @@ $(function(){
 
       url += strings.join(&quot;&amp;&quot;)
 
-      $(&quot;#link&quot;).show()
-      $(&quot;#link input.link&quot;).val(url).focus().select()
+      showTheUrl(url)
+    })
+  }
 
-      $.getJSON(&quot;http://json-tinyurl.appspot.com/?callback=?&amp;url=&quot; + gentlyEncode(url), function(data) {
-        $(&quot;#tiny input.link&quot;).val(data.tinyurl)
-        $(&quot;#tiny&quot;).show()
+  function showTheUrl(url) {
+    $(&quot;#link&quot;).show();
+    inputLink.val(url).focus().select();
+    copyButtons.centerOver(inputLink);
+    $(&quot;#link&quot;).hover(function(){
+      inputLink.fadeTo(&quot;fast&quot;, 0.5);
+      copyButtons.fadeIn(&quot;fast&quot;);
+    }, function(){
+      inputLink.fadeTo(&quot;fast&quot;, 1.0);
+      copyButtons.fadeOut(&quot;fast&quot;);
+    });
+    $.sendToClipboard(inputLink.val());
+    copyStatus(&quot;url.copied&quot;);
+
+    $(&quot;#copy_url&quot;).click(function(){
+      $.sendToClipboard(inputLink.val());
+      copyStatus(&quot;url.copied&quot;);
+      return false;
+    });
+    $(&quot;#copy_tiny&quot;).click(function(){
+      $.getJSON(&quot;http://json-tinyurl.appspot.com/?callback=?&amp;url=&quot; + gentlyEncode(inputLink.val()), function(data) {
+        $.sendToClipboard(data.tinyurl)
+        copyStatus(&quot;url.shortened&quot;);
       });
-    })
+      return false;
+    });
+    $(&quot;#copy_go&quot;).click(function(){
+      window.location = inputLink.val();
+      return false;
+    });
   }
 
   function googleItForThem() {</diff>
      <filename>application.js</filename>
    </modified>
    <modified>
      <diff>@@ -18,14 +18,16 @@
         #instructions { margin-top: 50px; font-size: 1.1em; color: #999; width: 334px; height: 84px; background-image: url(images/instructions_bg.png); }
         #instructions div { line-height: 84px; }
         #link { display: none; margin-top: 25px; }
-        #tiny { display: none; }
-        #tiny .or { color: #999; line-height: 1.5em; }
         input.link { width: 312px; font-size: 1.2em; text-align: center; border: 1px solid #c2c9ff; color: #555; background-color: #f4fbff; cursor: pointer; }
         #footer { color: #999; margin-top: 50px; border-top: solid 1px #ddd; padding-top: 0.5em; }
         #footer a { color: #999; text-decoration: none; padding: 0 1em; }
         #footer a:hover { text-decoration: underline; }
         #about { margin-top: 0.5em; color: #666; }
         #copyright { position: fixed; bottom: 0; width: 100%; padding: 0.25em; text-align: center; font-size: 0.75em; color: #bbb; background-color: #fff; }
+        #copy_buttons, #copy_message { position: absolute; display: none; }
+        a.copy_button { display: block; float: left; width: 60px; height: 20px; margin: 0 2px; background: url(images/copy_button.png); color: #fff; line-height: 20px; text-align: center; font-size: 0.8em; text-decoration: none; }
+        a.copy_button:hover { background: url(images/copy_button_hover.png) }
+        #copy_message { z-index: 99; width: 332px; height: 32px; background: url(images/copy_message.png); color: #fff; line-height: 32px; text-align: center; font-size: 1em; }
   %body
     %center
       .logo
@@ -47,14 +49,16 @@
 
       #link
         %input.link.copyable{ :type =&gt; &quot;text&quot;, :readonly =&gt; true }
-      #tiny
-        .or{:rel =&gt; &quot;localize.setup.or&quot; } or
-        %input.link.copyable{ :type =&gt; &quot;text&quot;, :size =&gt; 40, :readonly =&gt; true }
+        #copy_message
+        #copy_buttons
+          %a#copy_url.copy_button{ :href =&gt; &quot;#&quot;, :rel =&gt; &quot;localize.url.copy&quot; } copy
+          %a#copy_tiny.copy_button{ :href =&gt; &quot;#&quot;, :rel =&gt; &quot;localize.url.shorten&quot; } shorten
+          %a#copy_go.copy_button{ :href =&gt; &quot;#&quot;, :rel =&gt; &quot;localize.url.go&quot; } go
 
       #footer
         %a.about{ :href =&gt; &quot;#&quot;, :name =&gt; &quot;about&quot;, :rel =&gt; &quot;localize.about&quot; } About
         %a{ :rel =&gt; &quot;localize.contact&quot;, :href =&gt; &quot;&amp;#109;&amp;#97;&amp;#105;&amp;#108;&amp;#116;&amp;#111;&amp;#58;%73%74%61%66%66@%6c%6d%67%74%66%79.%63%6f%6d?body=Jim%20and%20Ryan%20are%20awesome%21&amp;amp;subject=I%20love%20LMGTFY%21&quot; } Contact
-        
+
       #about{ :style =&gt; &quot;display: none&quot; }
         %p{ :rel =&gt; &quot;localize.credit&quot; }        Created by @coderifous, contributions by @rmm5t.
         %p{ :rel =&gt; &quot;localize.genesis&quot; }       Inspired during a lunch conversation with @coderifous, @tmassing, @rmm5t, @EricStratton, and @methodvon.
@@ -64,11 +68,11 @@
         %br
 
     #copyright
-      &amp;copy; LMGTFY, 2008 | 
+      &amp;copy; LMGTFY, 2008 |
       %span{ :rel =&gt; &quot;localize.google_owns_google&quot; } GOOGLE is a trademark of Google Inc.
 
     %img#fake_mouse{ :src =&gt; &quot;images/mouse_arrow.png&quot;, :style =&gt; &quot;display: none&quot; }
-    
+
     :plain
       &lt;script type=&quot;text/javascript&quot;&gt;
       var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);</diff>
      <filename>index.haml</filename>
    </modified>
    <modified>
      <diff>@@ -10,19 +10,26 @@
   setup: {
     type_question: &quot;Type a question, click a button.&quot;,
     share_link:    &quot;Share the link below.&quot;,
-    or:            &quot;or&quot;
   },
-  
+
   play: {
     step_1: &quot;Step 1: Type in your question&quot;,
     step_2: &quot;Step 2: Click the Search button&quot;,
     pwnage: &quot;Was that so hard?&quot;
   },
-  
+
+  url: {
+    copy:      &quot;copy&quot;,
+    shorten:   &quot;shorten&quot;,
+    go:        &quot;go&quot;,
+    copied:    &quot;URL copied to clipboard&quot;,
+    shortened: &quot;TinyURL copied to clipboard&quot;
+  },
+
   credit:     &quot;Created by @coderifous, contributions by @rmm5t.&quot;,
   genesis:    &quot;Inspired during a lunch conversation with @coderifous, @tmassing, @rmm5t, @EricStratton, and @methodvon.&quot;,
   pitch:      &quot;This is for all those people that find it more convenient to bother you with their question rather than google it for themselves.&quot;,
   disclaimer: &quot;Not associated with Google&#8482; in any way.&quot;,
-  
+
   translated_by: &quot;&lt;Translated by Your Name Goes Here /&gt;&quot;
 }
\ No newline at end of file</diff>
      <filename>lang/lmgtfy-en.json.example</filename>
    </modified>
    <modified>
      <diff>@@ -6,23 +6,30 @@
   about:              &quot;Acerca de&quot;,
   contact:            &quot;Contacto&quot;,
   google_owns_google: &quot;GOOGLE es una marca registrada de Google Inc.&quot;,
-  
+
   setup: {
     type_question: &quot;Escribe una pregunta y pulsa un bot&amp;oacute;n.&quot;,
     share_link:    &quot;Comparte el enlace de abajo.&quot;,
-    or:            &quot;o&quot;
   },
-  
+
   play: {
     step_1: &quot;Paso 1: Escribe tu pregunta&quot;,
     step_2: &quot;Paso 2: Pulsa el bot&amp;oacute;n buscar&quot;,
     pwnage: &quot;&amp;iquest;De verdad era tan dif&amp;iacute;cil?&quot;
   },
-  
+
+  url: {
+    copy:      &quot;copia&quot;,
+    shorten:   &quot;acortar&quot;,
+    go:        &quot;ir&quot;,
+    copied:    &quot;URL copiado al portapapeles&quot;,
+    shortened: &quot;TinyURL copiado al portapapeles&quot;
+  },
+
   credit:     &quot;Creado por @coderifous, con contribuciones de @rmm5t.&quot;,
   genesis:    &quot;Ideado en una comida con @coderifous, @tmassing, @rmm5t, @EricStratton, y @methodvon.&quot;,
   pitch:      &quot;Esto es para todas las personas que piensan que es mejor molestarte a ti antes que buscar en Google.&quot;,
   disclaimer: &quot;No tenemos nada que ver con Google&amp;trade;.&quot;,
-  
+
   translated_by: &quot;Traducido por aditza121.&quot;
 }</diff>
      <filename>lang/lmgtfy-es.json</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c844ae4033c117e4d5936883b105cddbf45a3971</id>
    </parent>
  </parents>
  <author>
    <name>Ryan McGeary</name>
    <email>ryanongit@mcgeary.org</email>
  </author>
  <url>http://github.com/coderifous/lmgtfy/commit/6c2dc0ddcdb27458ef789274cc42cc4e19be4558</url>
  <id>6c2dc0ddcdb27458ef789274cc42cc4e19be4558</id>
  <committed-date>2008-11-23T20:57:28-08:00</committed-date>
  <authored-date>2008-11-23T20:57:28-08:00</authored-date>
  <message>Better clipboard copy magic and improved tinyurl behavior</message>
  <tree>a6060bf5b0d034849d54bd85b742fc510975e354</tree>
  <committer>
    <name>Ryan McGeary</name>
    <email>ryanongit@mcgeary.org</email>
  </committer>
</commit>
