Amazon has made the Kindle service accessible by making the software run on most modern devices. It’s still not quite as easy to annotate as a PDF — I’m not sure it will ever be as user friendly as Goodreader — but it sort of makes up for that by offering some cool stats on each book. You can see other peoples’ notes and highlights, see how the book ranks among Amazon’s most-highlighted, etc.
Kindle.Amazon.com is a companion site to the software that makes it possible to review and edit your notes for each of your books. Sign in. Select a book. Select your highlights. The only downside is that you can’t export them.
The script below is meant to be converted into a bookmarklet and added to your bookmarks toolbar, and it can then be executed on the page containing your notes. It will launch a new window containing your notes in XML format. Just copy and paste.
Source
(function() {
var process = function(sb) {
/* CONTENT */
sb = sb.toString().replace(/\[hl\]/g,'<span class="highlight">').replace(/\[\/hl\]/g,"</span>");
sb = sb.toString().replace(/\[nt\]/g,'<span class="note">').replace(/\[\/nt\]/g,"</span>");
sb = sb.toString().replace(/\[em\]/g,'<em>').replace(/\[\/em\]/g,"</em>");
sb = sb.toString().replace(/\[-h1\]/g, '<h1>').replace(/\[\/-h1\]/g, "</h1>");
sb = sb.toString().replace(/\[-h2\]/g, '<h2>').replace(/\[\/-h2\]/g, "</h2>");
sb = sb.toString().replace(/\[-h3\]/g, '<h3>').replace(/\[\/-h3\]/g, "</h3>");
sb = sb.toString().replace(/\[-h4\]/g, '<h4>').replace(/\[\/-h4\]/g, "</h4>");
/* MARKUP */
sb = sb.replace(/</g,"<").replace(/>/g,">").toString();
return sb.toString();
};
var title = jQuery('.title').text().trim();
var book = '<?php Header("Content-type: application/xml"); ?>'+ '<?xml version="1.0"?>' + '<?xml-stylesheet href="/xsl.php" type="text/xsl"?>';
var sb = '';
var o = "\n"+'<book title="'+title+'">'+title;
var q1 = "\n"+'<quote type="highlight" >';
var q2 = '</quote>';
var c = "\n"+'</book>';
jQuery('div.highlightRow div.text').each(function() {
var note = jQuery(this).find('span.noteContent,span.highlight');
sb = sb + q1+jQuery(note).text().toString().replace(/\n/g,"<br />")+q2;
});
sb = process(book+o+sb+c);
newWindow = window.open("","","status,height=700,width=500")
newWindow.focus();
newWindow.document.write("<textarea>"+sb+"</textarea>");
newWindow.document.close();
})();
Bookmarklet
In some browsers, you can simply copy the bookmarklet into the URL and press return, and it will work. (It will only do its job if you’re on the page with your notes.) Some browsers force you to first manually create the bookmark by opening up your bookmarks and adding a new one.
javascript:(function%20()%20%7B%0A%20%20%20%20var%20process%20=%20function(sb)%20%7B%0A%20%20%20%20%0A%20%20%20%20sb%20=%20sb.toString().replace(/%5C%5Bhl%5C%5D/g,'%3Cspan%20class=%22highlight%22%3E').replace(/%5C%5B%5C/hl%5C%5D/g,%22%3C/span%3E%22);%0A%20%20%20%20sb%20=%20sb.toString().replace(/%5C%5Bnt%5C%5D/g,'%3Cspan%20class=%22note%22%3E').replace(/%5C%5B%5C/nt%5C%5D/g,%22%3C/span%3E%22);%0A%20%20%20%20sb%20=%20sb.toString().replace(/%5C%5Bem%5C%5D/g,'%3Cem%3E').replace(/%5C%5B%5C/em%5C%5D/g,%22%3C/em%3E%22);%0A%20%20%20%20%0A%20%20%20%20/*%20MARKUP%20*/%0A%20%20%20%20sb%20=%20sb.replace(/%3C/g,%22<%22).replace(/%3E/g,%22>%22).toString();%0A%20%20%20%20%0A%20%20%20%20return%20sb.toString();%0A%7D;%0A%0Avar%20title%20=%20jQuery('.title').text().trim();%0Avar%20book%20=%20'%3C?xml%20version=%221.0%22?%3E';%0Avar%20sb%20=%20'';%0Avar%20o%20=%20%22%5Cn%22+'%3Cbook%20title=%22'+title+'%22%3E'+title;%0Avar%20q1%20=%20%22%5Cn%22+'%3Cquote%20type=%22highlight%22%20%3E';%0Avar%20q2%20=%20'%3C/quote%3E';%0Avar%20c%20=%20%22%5Cn%22+'%3C/book%3E';%0AjQuery('div.highlightRow%20div.text').each(function()%20%7B%0A%20%20%20%20var%20note%20=%20jQuery(this).find('span.noteContent,span.highlight');%0A%20%20%20%20sb%20=%20sb%20+%20q1+jQuery(note).text().toString().replace(/%5Cn/g,%22%3Cbr%20/%3E%22)+q2;%0A%7D);%0A%0Asb%20=%20process(book+o+sb+c);%0A%0AnewWindow%20=%20window.open(%22%22,%22%22,%22status,height=700,width=500%22)%0AnewWindow.focus();%0AnewWindow.document.write(%22%3Cpre%3E%22+sb+%22%3C/pre%3E%22);%0AnewWindow.document.close();%0A%20%20%20%20%0A%7D)();