Skip to main content

Posts

Showing posts with the label clipboard hack

Clipboard Hack

A simple script has it all: var content = clipboardData.getData("Text"); alert(content); put this in the script tag! Didn't know it was that easy! Solution for IE: Go to internet options->security Press custom level In the security settings, select disable under Allow paste operations via script Not every browser seems to be allowing such easy way of protection ;) Solution for Chrome: Go to browser "Options" Choose Under the Hood Tab --> Content Settings Select Javascript -- Don't allow any site to run JavaScript I haven't tested this yet though! Let me know if you know better ways :) and also how to do it on various browsers :) Thanks!