message: Apply `linkify-code` to unfolded diffs
diff: import select from 'select-dom';
  +import onetime from 'onetime';
  +import {observe} from 'selector-observer';
  import * as pageDetect from 'github-url-detection';
  import features from '.';
  import {linkifiedURLClass, linkifyURLs, linkifyIssues} from '../github-helpers/dom-formatters';
  -function init(): false | void {
  - const wrappers = select.all(`
  - .js-blob-wrapper:not(.${linkifiedURLClass}),
  - .blob-wrapper:not(.${linkifiedURLClass}),
  - .comment-body:not(.${linkifiedURLClass})
  - `);
  -
  - if (wrappers.length === 0) {
  - return false;
  - }
  +function init(): void {
  + const selectors = [
  + '.js-blob-wrapper',
  + '.blob-wrapper',
  + '.comment-body',
  + '.blob-expanded'
  + ].map(selector => selector + `:not(.${linkifiedURLClass})`).join();
  + observe(selectors, {
  + add(wrappers) {
  // Linkify full URLs
  // `.blob-code-inner` in diffs
  // `pre` in GitHub comments
  @@ -28,9 +29,9 @@ function init(): false | void {
  }
  // Mark code block as touched
  - for (const element of wrappers) {
  - element.classList.add(linkifiedURLClass);
  + wrappers.classList.add(linkifiedURLClass);
  }
  + });
  }
  void features.add({
  @@ -41,5 +42,5 @@ void features.add({
  include: [
  pageDetect.hasCode
  ],
  - init
  + init: onetime(init)
  });
  