3

On Firefox (at least) JavaScript copy and paste functions are disabled by default. Is there anyway to check if the functionality is available so i can hide some buttons if its not?

Petah
  • 45,477
  • 28
  • 157
  • 213
  • Related: http://stackoverflow.com/questions/127040/copy-put-text-on-the-clipboard-with-firefox-safari-and-chrome – quantumSoup Aug 23 '10 at 13:06
  • Not related, that post is to do with accesses the clipboard, I just need to check if I can/cant access it. – Petah Aug 24 '10 at 12:33

1 Answers1

0

Tested in IE8, FF3.6.10, Chrome 3.0.195. Safari 4.0:

if(typeof(window.clipboardData)=="undefined") {
  alert("not working")
}
else {
  alert("working")
}
Ben
  • 54,723
  • 49
  • 178
  • 224