Tuesday, 15 November 2011

Copy & Paste your Kindle Highlights Online

Requirements:
- Firefox
- GreaseMonkey add-on
- your Kindle account on Amazon

Step 1: Install the GreaseMonkey add-on & restart Firefox

The Add-on can be found at https://addons.mozil...n/greasemonkey/


Step 2: Create the GreaseMonkey script

Start creating your first GreaseMonkey script with the following info:

Posted Image


Then copy & paste the following javascript I've made:


// ==UserScript==
// author: Anan. O.
// date: 14 Nov. 2011
// @name Kindlehighlights
// @namespace kindlehighlights
// @include https://kindle.amazon.com/your_highlights*
// ==/UserScript==

var $;

// Add jQuery
(function(){

if (typeof unsafeWindow.jQuery == 'undefined') {

var GM_Head = document.getElementsByTagName('head')[0] || document.documentElement,

GM_JQ = document.createElement('script');

GM_JQ.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js';

GM_JQ.type = 'text/javascript';
GM_JQ.async = true;

GM_Head.insertBefore(GM_JQ, GM_Head.firstChild);
}

GM_wait();
})();

// Check if jQuery's loaded
function GM_wait() {

if (typeof unsafeWindow.jQuery == 'undefined') {

window.setTimeout(GM_wait, 100);
} else {

$ = unsafeWindow.jQuery.noConflict(true);
letsJQuery();

}
}

// All your GM code must be inside this function
function letsJQuery() {
var title = "";

var highlightsArray = new Array();

$("#allHighlightedBooks").each(function()

{
// get the title of the book
title = $(this).find("span[class='title'] > a").text();


// list all highlights
$(this).find("div[class='highlightRow yourHighlight'] > span[class='highlight']").each(function()

{
highlightsArray.push("<img src='http://www.ewebmarketing.com.au/wp-content/themes/thesis_18/custom/images/layout/open-quote-icon.jpg' width='16px'> "+$(this).text()+" <img src='http://www.ewebmarketing.com.au/wp-content/themes/thesis_18/custom/images/layout/close-quote-icon.jpg' width='16px'>");

});
});

$("#allHighlightedBooks").html("<hr/><h1>"+title+"</h1><br/>"+highlightsArray.join("<br/><br/>")+"<br/><br/><hr/>");

}





Step 3: Sign-in to your Amazon.com account

and go to your Kindle account: https://kindle.amazo...your_highlights to see the difference ;)

Before (GreaseMonkey disabled):

Posted Image

After (GreaseMonkey Enabled, refresh the page if necessary):
Posted Image

Now you can copy & paste your highlights easier.
If you know a little bit of HTML, you can easily customise the little script to fit your need ;)

Enjoy sharing !!!! ^_^

Tuesday, 2 August 2011

Mackerel Soufflé

Another easy meal in 20min for my Dad who loves Soufflé. :)

Saturday, 18 June 2011

Horse Tartar

I never tried Horse meat,
so... making a tartar was the first thing that came out of my mind :p