message: Restore `copy-file` feature
diff: @@ -2,33 +2,29 @@ import React from 'dom-chef';
  import select from 'select-dom';
  import copyToClipboard from 'copy-text-to-clipboard';
  import features from '../libs/features';
  -import {groupSiblings} from '../libs/group-buttons';
  -function init() {
  - // This selector skips binaries + markdowns with code
  - for (const code of select.all('.file .blob-wrapper > .highlight:not(.rgh-copy-file)')) {
  - code.classList.add('rgh-copy-file');
  - const file = code.closest('.file');
  +function handleClick({target: button}) {
  + const file = button.closest('.Box');
  const content = select.all('.blob-code-inner', file)
  .map(blob => blob.innerText)
  .map(line => line === '\n' ? '' : line)
  .join('\n');
  - const handleClick = () => {
  copyToClipboard(content);
  - };
  +}
  - // Prepend to list of buttons
  - const firstAction = select('.file-actions .btn', file);
  - if (firstAction) {
  - firstAction.before(
  - <button onClick={handleClick} class="btn btn-sm copy-btn tooltipped tooltipped-n" aria-label="Copy file to clipboard" type="button">Copy</button>
  +function init() {
  + // This selector skips binaries + markdowns with code
  + for (const code of select.all('.blob-wrapper > .highlight:not(.rgh-copy-file)')) {
  + code.classList.add('rgh-copy-file');
  + code
  + .closest('.Box') // Closest common container
  + .querySelector('[data-hotkey="b"]') // Easily-found `Blame` button
  + .parentElement // `BtnGroup`
  + .prepend(
  + <button onClick={handleClick} class="btn btn-sm copy-btn tooltipped tooltipped-n BtnGroup-item" aria-label="Copy file to clipboard" type="button">Copy</button>
  );
  -
  - // Group buttons if necessary
  - groupSiblings(firstAction);
  - }
  }
  }
  