April 6, 2012
How do you disable copy, paste, and print like Amazon's Kindle web e-reader?
Question by Dominic Tancredi
How does Amazon Kindle’s web e-reader (https://read.amazon.com/) disable copy and paste?
Also, how does it make the “printing” of the page render only a blank page?
I reviewed it in the Google Chrome browser, and would like to know what browsers this can be implemented on.
They still allow text selection (for Highlight or Note) so they’re not disabling selection, I believe.
Answer by Starx
Mostly they are done by JavaScript. They catch the key stroke of ctrl
+ c
& ctrl
+ v
then cancel the propagation. And also they disable the right click, by catching the mouse event for right button and stop its propagation.
But this is of no use because once the java script is disabled, they are all gone.
The printer printing blank can be done using media queries
@media print {
* { display: none; }
}