Add a Yahoo! Bookmark with One Click

Speed up the process of adding sites to your Yahoo! Bookmarks with a browser bookmark and a bit of JavaScript.
Yahoo! Bookmarks are an easy way to share a list of web sites across several computers. If you have a set of sites you like to visit from home, the office, a friend's house, or any other place you might find yourself in front of a computer, they'll always be just a few clicks away at your Yahoo! account, instead of trapped inside your browser at home.

Unfortunately, setting up this list of sites for the first time can be time-consuming. After logging into My Yahoo!, you must find your bookmarks (usually in the upper-right corner); click Add; copy and paste the site URL, name, and any comments into the form; and click the Save button. This might not sound too labor intensive, but it amounts to quite a few steps if you're adding more than a few sites.
If you've installed the Yahoo! Toolbar, you might have already experienced the joy of one-click Yahoo! Bookmarks. On any web page, you can click the Add Bookmark button to add a site. From then on, the site will be available at your Yahoo! Bookmarks. If you don't want to install the Yahoo! Toolbar (to save browser real estate) but still want the convenience of adding bookmarks, you can build your own JavaScript bookmarklet and add it to your browser's bookmarks toolbar to get the same one-click effect.


A bookmarklet is a bit of JavaScript code stored in a web browser bookmark. Bookmarklets give you a way to run code that can interact with the current page in the browser. For example, bookmarklets can change the size and colors of fonts on a page, open new browser windows, or extract information about the current page. With bookmarklets, you're in control of the script, because it runs when you click the bookmark.
In order to implement this hack, the only thing you'll need is a browser that has bookmarks and understands JavaScript. Don't worry, that covers just about every web browser!

the functioning bookmarklet code will be formatted without linebreaks or spaces.

// Dissected JavaScript bookmarklet for one-click Yahoo! Bookmarks
 
 // Set d to the document object as a shortcut
 var d = document;

 // Set t to the currently selected text, if available
 var t = d.selection?d.selection.createRange( ).text:d.getSelection( );

 // Build the URL that will add a bookmark to Yahoo! Bookmarks
 var url = 'http://e.my.yahoo.com/config/edit_bookmark?';
 url += '.src=bookmarks&';
 url += '.done=http%253a%2F%2Fe.my.yahoo.com/config/set_bookmark&';
 url += '.folder=1&';
 url += '.action=ab&';
 url += '.display=1&';
 url += '.protocol=http%3A%2F%2F&';

 // include the URL of the current page
 url += '.url='+escape(d.location.href)+'&';

 // include the title of the current page
 url += '.name='+escape(d.title)+'&';

 // include any selected text of the current page as a comment
 url += '.comment='+escape(t)+'&';
 url += '.save=+Save+';

 // open a new window to add the bookmark and show the results
 window.open(url,
    '_blank',
    'width=640,height=440,status=yes,resizable=yes,scrollbars=yes');

Take a look at the bold querystring variables in the code. These are the primary elements of the Yahoo! URL we're concerned with. Here's a quick look at what each variable represents:

.done
The URL to display after the action is completed.

.folder
The ID of the folder in which you'd like the bookmark to be included. If you don't have multiple folders, use 1, which is the default.

.url
The URL of the site you're adding as a bookmark.

.name
The name of the site you're adding as a bookmark.

.comment
Some arbitrary text that is associated with the bookmark.



Related Posts:
  • Web Hacking - Attacks And Defense The early Web storefronts were designed by using scripting languages such as Perl, running on a Web server, and interacting with flat files instead of databases. The systems were heterogeneous; that is, each component… Read More
  • iPhone6-Larger Display The new iPhone6 is the one of the most nice devices. Apple's latest news and predictions about the iphone 6.Iphone 6 rumored to include 10+-megapixel camera with f/1  to builda more affordable iphone, one analyst bel… Read More
  • Internet Speed Tester Test your broadband connection quality and speed try megapath speed test plus and see if your connection can support voip and other net applications. Internet speed and performance test by toast.net this speed test will id… Read More
  • SQL Commands List-Database Servers SQL Commands Command Description ALTER DATABASE Alters the selected database by adding or removing files. ALTER TABLE Alters a table within a database by altering, adding, or dropping colum… Read More
  • Nokia x-launched Nokia x 5 megapixel camera phone launched in india  nokia x to launch in march as part of asha range according to a recent report by go android, the nokia x will join nokia s asha range in india in march. Nokia… Read More
  • LG-4G   Android 4.1 Jelly Bean OS With fast load times and the Google Now personal assistant built in, this operating system helps you manage your day-to-day activities. View live traffic and weather reports and find y… Read More
  • android-security-apps Which android security apps are the most effective  today, much of  the world s business is done over mobile phones and tablets from  online banking to talking to clients, it would be tough to do business… Read More
  • Samsung Galaxy S5 - Wireless charging - ANT+ support- S-Voice natural language commands and dictation- Smart stay, Smart pause, Smart scroll- Air gestures- Dropbox (50 GB cloud storage)- Active noise cancellation with dedicated mic- TV-out … Read More
  • Nokia Asha 501 Nokia Asha 501 is affordable smartphone design and bold color, a high-quality build and an innovative user interface. The Nokia Asha 501 is the first device to run on the new Asha platform, that is read to make the e… Read More
  • Galaxy S5 pricing-AT&T AT&T has said the pricing and availability of the Samsung Galaxy S5 You can also opt for the AT&T Next plans - in that case the Galaxy S5 comes at $25  per month on AT&T Next 18 or $32.5/month with AT… Read More
  • Apple_iPhone5s_sm1 The design of the phone is largely unchanged from the slick aluminum iPhone 5.  There is now, of course, a gold iPhone in the mix, and the black  model is a bit more gray, but otherwise, the screen, body dimensio… Read More
  • Abstract data type In programming, a data set defined by the programmer in terms of the information it can contain and the operations that can be performed with it. An abstract data type is more generalized than a data type constr… Read More
  • Top CAR INSURANCE QUOTES TOP CAR INSURANCE QUOTES … Read More
  • php job in kolkata Learn web design & development with sitepoint tutorials, courses and books -  html5, css3, javascript, php, mobile app development, responsive web design.  In-depth tanking class/job analysis - tutorials and … Read More
  • Most poisonous snakes Most poisonous snakes … Read More