copyText = function copyText(text) {
    var textField = document.createElement('textarea');
    $(textField).html(text);
    document.body.appendChild(textField);
    textField.select();
    try {
      document.execCommand('copy');
    } catch (e) {
      console.warn('Oops, unable to copy', e);
    }
    $(textField).remove();
  }
@author Homer Glascock <HopGlascock@gmail.com>
@update zhixin wen <wenzhixin2010@gmail.com>