Created
August 10, 2011 16:31
-
-
Save jerodsanto/1137337 to your computer and use it in GitHub Desktop.
Bookmarklet to uncripple Kindle Cloud Reader
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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; | |
} | |
})(); |
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
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?