21 January 2014

Add Search Shortcuts on your Android and iOS Device



How do you search a popular website, say Twitter or YouTube, on your mobile phone? You would launch the browser, open the corresponding website and then use the search box inside that site. Or you would use the mobile app, if you have installed one.


There’s an alternate way as well. You may consider installing search shortcuts on the home screen of your mobile phone and they will help you perform searches on your favorite website with fewer steps.


Search your favorite websites with fewer steps

Search your favorite websites with a tap



Let’s dive right into an example.


Open the Safari browser on your iPhone (or iPad) and click here to open the search shortcut for Wolfram Alpha. A pop-up dialog will open but since we are installing the shortcut, hit the Cancel button to close that dialog. Now tap the Share icon in Safari and choose “Add to Home Screen” to add that search shortcut to your home screen.


The next time you want to search Wolfram on your phone, tap the Wolfram shortcut available on your home screen, enter the search terms and it will take you directly to the search results on the Wolfram website. That’s just one tap.


You can similarly add search shortcuts on your Android device using the newer version of Chrome browser. Open any of the search shortcuts listed below, “cancel” the pop-up dialog and then choose the “Add to homescreen” option under the main menu to place a shortcut on your homescreen for quick access.


Search Shortcuts for Android and iOS


Here are some ready-to-install search shortcuts for some popular websites that you may add to the homescreen of your Android or iOS device.



  1. Twitter Search

  2. YouTube Search

  3. Google I’m Feeling Lucky

  4. Wolfram Alpha

  5. Google Image Search

  6. Bing Search

  7. Amazon Search

  8. Google+ Search

  9. Wikipedia Search

  10. Facebook Search


Write your own Search Shortcuts


A search shortcut is essentially a little piece of JavaScript, much like a bookmarklet, that accepts input through a pop-up dialog and redirects the user to the search results page.


Writing one is easy. For instance, here’s the code for the Google I’m Feeling Lucky shortcut that automatically transports you to the first search result (useful when you don’t remember the exact URL of a site).



<!-- Page Title -->
<title>Feeling Lucky</title>

<!-- Touch Icon - This will show up on the home screen -->
<link rel="apple-touch-icon" href="lucky.png" />

<script>
var u = "http://ift.tt/1iiBXav;;
<!-- Show the input dialog -->
var q = window.prompt('What are you looking for?','');
if(q) {
/* If the user has entered input, redirect to search results */
u = u + "/search?&btnI=I%27m+Feeling+Lucky&q=" + escape(q);
window.location.href = u;
} else {
/* If the user hits cancel, show helper text and do nothing */
document.write("Add me to your home screen");
}
</script>

All you need to know is the URL of the search results page and use it in line #13.




This story, Add Search Shortcuts on your Android and iOS Device, was originally published at Digital Inspiration on 21/01/2014 under Android, IPad, IPhone, Search, Internet

No comments:

Post a Comment