Table of Contents:

What does Search and Share do?

Search and Share makes highlighting text a more functional action. More specifically, it attempts to understand the intention of a user's text selection and present a variety of options accordingly. The criteria for understanding the intention is the character length of the selection, and the interpreted actions are copying, searching and sharing.

To see the script in action, try highlighting any text on this page. If you select a lot of text, click copy and paste it somewhere. If you want to select only a word of phrase, here are some search-worthy examples:

Reasons to Use It

  1. Get credit for your content. Whenever someone selects more than 40 characters from your web page and clicks the "Copy" link, your page title and URL will be included in the footer of the copied text. No longer will excerpts of your paragraphs float around AIM, or other places on the web, without attribution.
  2. Improve word of mouth. Or word of email anyway. Just like the copy functionality, your users will also be presented with the option to directly embed the excerpt in a newly composed email within Outlook, Gmail or Yahoo Mail.
  3. Go new-media viral. Make it easier for people to tweet about you. If you've got a younger audience, this twitter option will be a mass-promotion alternative to the more direct but confined email.
  4. Provide context. Odds are, if you're writing anything worth reading about, a large chunk of your audience will want more details on the content they're unfamiliar with. With this script, they can get the biography of an unfamiliar politician, Google search results for related pages, or the set of fast-facts that Wolfram Alpha is quickly becoming known to provide.
  5. Keep visitors longer. All of the aforementioned actions can be done while keeping your page open. As a result, your visitors will stay on your page longer, and unsurprisingly, they will also be more likely to continue to another page within your site. Plus, (if you'll allow my speculation...) as search engines use visitor retention metrics more and more to determine a site's value, it seems likely that you'll be positioning yourself to benefit with new search traffic too.

How to Implement It

  1. Upload this file and th css, images, and js folders to your server (any directory is fine).
  2. Open this file, readme.html, in a browser. Confirm that, before changing anything, you can trigger the script by selecting text. Do not attempt to test this file locally. The script depends on flash, which may behave erratically if run from your computer.
    Note: If readme.html doesn't work on your server, post in the comments at: http://www.latentmotion.com/search-and-share/ . Either I, or one of our visitors will help you there. Do not contact me directly, as someone else with the same problem will not see and benefit from our troubleshooting.
  3. Now that we know the script is working, copy the javascript and css files from the header of readme.html and paste them into the header of your web page. You can also try copying the code from the box below, but in either case make sure to update the file paths. If you don't know what I'm talking about, the simplest thing to do is add "http://www.yoursite.com/wherever-the-folder-is/ before the " js/ " and " css/ " below:


  4. Copy the html of "copyMenu" into your page. Be sure to keep the link "Search and Share" that goes to this page, as removing is both illegal and will make the script break. You can also copy it from below:

  5. Do a dance, you're done!

How to Modify It

Future Plans for the Script

Supported Browsers (known)

Extra Credit and Kudos