logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

share.js (638B)


  1. import loadPolyfills from '../mastodon/load_polyfills';
  2. function loaded() {
  3. const ComposeContainer = require('../mastodon/containers/compose_container').default;
  4. const React = require('react');
  5. const ReactDOM = require('react-dom');
  6. const mountNode = document.getElementById('mastodon-compose');
  7. if (mountNode !== null) {
  8. const props = JSON.parse(mountNode.getAttribute('data-props'));
  9. ReactDOM.render(<ComposeContainer {...props} />, mountNode);
  10. }
  11. }
  12. function main() {
  13. const ready = require('../mastodon/ready').default;
  14. ready(loaded);
  15. }
  16. loadPolyfills().then(main).catch(error => {
  17. console.error(error);
  18. });