mirror of https://github.com/onweru/compose.git

weru
27.56.2020 413e03f10099d7c341bd76337b6892e0893ae445
assets/js/index.js
@@ -183,27 +183,6 @@
    }
  });
  const copyToClipboard = str => {
    let copy, selection, selected;
    copy = createEl('textarea');
    copy.value = str;
    copy.setAttribute('readonly', '');
    copy.style.position = 'absolute';
    copy.style.left = '-9999px';
    selection = document.getSelection();
    doc.appendChild(copy);
    // check if there is any selected content
    selected = selection.rangeCount > 0 ? selection.getRangeAt(0) : false;
    copy.select();
    document.execCommand('copy');
    doc.removeChild(copy);
    if (selected) { // if a selection existed before copying
      selection.removeAllRanges(); // unselect existing selection
      selection.addRange(selected); // restore the original selection
    }
  }
  function copyFeedback(parent) {
    const copyText = document.createElement('div');
    const yanked = 'link_yanked';
@@ -355,4 +334,4 @@
}
window.addEventListener('load', loadActions());
window.addEventListener('load', loadActions());