message: Gist embed: add "loading" + only embed if it's one file
diff: import {h} from 'dom-chef';
  import select from 'select-dom';
  +import domify from '../libs/domify';
  const isGist = link =>
  !link.pathname.includes('.') && // Exclude links to embed files
  @@ -9,9 +10,19 @@ const isGist = link =>
  );
  async function embedGist(link) {
  + const info = <em> (loading)</em>;
  + link.after(info);
  +
  + try {
  const response = await fetch(`${link.href}.json`);
  const gistData = await response.json();
  + const files = domify(gistData.div).firstElementChild;
  + const fileCount = files.children.length;
  +
  + if (fileCount > 1) {
  + info.textContent = ` (${fileCount} files)`;
  + } else {
  link.parentNode.attachShadow({mode: 'open'}).append(
  <style>{`
  .gist .gist-data {
  @@ -20,9 +31,13 @@ async function embedGist(link) {
  }
  `}</style>,
  <link rel="stylesheet" href={gistData.stylesheet} />,
  - <div dangerouslySetInnerHTML={{__html: gistData.div}} />
  + files
  );
  }
  + } catch (err) {
  + info.remove(' (embed failed)');
  + }
  +}
  export default () => {
  select.all('.js-comment-body p a:only-child')
  .filter(isGist)
  