Skip to content

Instantly share code, notes, and snippets.

@jerodsanto
Created August 10, 2011 16:31
Show Gist options
  • Save jerodsanto/1137337 to your computer and use it in GitHub Desktop.
Save jerodsanto/1137337 to your computer and use it in GitHub Desktop.
Bookmarklet to uncripple Kindle Cloud Reader
(function() {
function uncrippleFrame() {
var body = this.contentWindow.document.getElementsByTagName('body')[0];
this.contentWindow.onclick = null;
body._frame = this;
body.onmousemove = function() {
this._frame.contentWindow.onclick = null;
this.setAttribute('style', '-webkit-user-select: auto;');
this.oncontextmenu = body.onselectstart = null;
};
body.onmousemove();
};
var container = document.getElementsByTagName('iframe')[0].contentWindow;
var frames = container.document.getElementsByTagName('iframe');
for (var i = 0; i < frames.length; i++) {
uncrippleFrame.call(frames[i]);
frames[i].onload = uncrippleFrame;
}
})();
@jaredatron
Copy link

works great as of today. I'm going to make this a glimmerblocker plugin so it just always runs =)

@JWamateur
Copy link

i'm pretty new at this. downloaded the file, but can't get it to open in any of my browsers (tried IE and firefox). any suggestions?

@dhjdhj
Copy link

dhjdhj commented Mar 23, 2012

Just tried it with Safari 5.1.4 on my Mac and it doesn't work at all. No errors in the dev console either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment