Skip to content

Instantly share code, notes, and snippets.

@yoonchulkoh
Created August 12, 2015 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yoonchulkoh/09696bc761e75a5f49eb to your computer and use it in GitHub Desktop.
Save yoonchulkoh/09696bc761e75a5f49eb to your computer and use it in GitHub Desktop.
kindle highlights
(function(b){void 0==document.createElement("div").innerText&&Object.defineProperty(HTMLElement.prototype,"innerText",{get:function(){return this.textContent},set:function(a){this.textContent=a}});var d=b.querySelector(".title").innerText,e=b.querySelector(".author").innerText,f=b.querySelectorAll(".highlight");b=b.querySelectorAll(".k4pcReadMore");var g=parseInt(document.querySelector(".boldText").innerText),c=0,a=[];a.push('<div class="book_info">');a.push('<span class="title">'+d+"</span><br />");a.push('<span class="author">'+e+"</span>");a.push("</div>");for(a.push('<div class="highlights">');c<g;c++)a.push("<hr />"),a.push("<p>"+f[c].innerText+"</p>"),a.push('<p><a href="'+b[c].href+'">'+b[c].innerText+"</a></p>");a.push("</div>");document.title=d;document.body.innerHTML=a.join("");document.body.style.fontSize = '1em'})(document);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment