* replace inline attribute defer with external js - show.html.erb * fix typo in filename * disable no-undef and bail if not defined * put js on subfolder utilities * refactor jsx instead of loading chunk with defer * fix typo in desc * better name for global gist helper * use InstantClick * working script on preview AND single view, not dynamic import, though * embed only if gists * combine all approaches to make dynamic import work * make gist embeds work on submit comment form * make gist embeds work on preview comment * refactor - preview comments and submit * add pack editComment + helper embedGistsInComments * comment gist helper * delete useless file utility * use new syntax for events * put code in method embedGistsInComments * delete older pack gist * handle edge case 'view full discussion' * resolve conflict with package ibm-openapi-validator * resolve conflict with package husky * empty commit to test random error travis * better name for class dismiss * handle future events submit * delete test code on click toggle form * delete unused file * rename pack as js file, not jsx * Added POC using MutationObserver. * missing case: notification page * use custom pack notification page * add e2e test for comment with embed gist * add e2e test for preview post with embed gist * add an extra step in tests to check gist is present Co-authored-by: Nick Taylor <nick@dev.to> Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
4 lines
147 B
JavaScript
4 lines
147 B
JavaScript
import { embedGists } from '../utilities/gist';
|
|
|
|
const targetNode = document.querySelector('.comment-form');
|
|
targetNode && embedGists(targetNode);
|