From http://stackoverflow.com/questions/3436102/copy-to-clipboard-in-chrome-extension