X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Fmodals%2Fembed_modal.js.map;h=afc149bf705806dd1199ad1e7f2db9c96731b294;hb=57d5ff57d6fb7cfe8d67588d5f95c2b9cdfab436;hp=a50e74ffc6b747a573ae806559df431e0e8805e2;hpb=00d43333735acbcadc1dd04ff793f4ce6e8eecb1;p=akkoma diff --git a/priv/static/packs/modals/embed_modal.js.map b/priv/static/packs/modals/embed_modal.js.map index a50e74ffc..afc149bf7 100644 --- a/priv/static/packs/modals/embed_modal.js.map +++ b/priv/static/packs/modals/embed_modal.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///app/javascript/seagate/sources/git/hacktivis.me/git/mastofe/app/javascript/mastodon/features/ui/components/embed_modal.js"],"names":["EmbedModal","injectIntl","loading","oembed","c","_this","iframe","e","target","select","componentDidMount","_this2","this","url","props","setState","api","post","then","res","data","iframeDocument","contentWindow","document","open","write","html","close","body","style","margin","width","scrollWidth","height","scrollHeight","catch","error","onError","render","state","Object","_babel_runtime_helpers_esm_jsx__WEBPACK_IMPORTED_MODULE_0__","className","react_intl__WEBPACK_IMPORTED_MODULE_7__","id","defaultMessage","type","readOnly","value","onClick","handleTextareaClick","react__WEBPACK_IMPORTED_MODULE_4___default","a","createElement","frameBorder","ref","setIframeRef","sandbox","title","ImmutablePureComponent","PropTypes","string","isRequired","onClose","func","intl","object"],"mappings":"qOAOMA,EADUC,oNAUN,CACNC,SAAS,EACTC,OAAQ,8DAyBK,SAAAC,GACbC,EAAKC,OAASF,kEAGM,SAACG,GACrBA,EAAEC,OAAOC,yDA3BXC,kBAAA,WAAqB,IAAAC,EAAAC,KACXC,EAAQD,KAAKE,MAAbD,IAERD,KAAKG,SAAS,CAAEb,SAAS,IAEzBc,cAAMC,KAAK,iBAAkB,CAAEJ,QAAOK,KAAK,SAAAC,GACzCR,EAAKI,SAAS,CAAEb,SAAS,EAAOC,OAAQgB,EAAIC,OAE5C,IAAMC,EAAiBV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port ImmutablePureComponent from 'react-immutable-pure-component';\nimport { FormattedMessage, injectIntl } from 'react-intl';\nimport api from '../../../api';\n\nexport default @injectIntl\nclass EmbedModal extends ImmutablePureComponent {\n\n static propTypes = {\n url: PropTypes.string.isRequired,\n onClose: PropTypes.func.isRequired,\n onError: PropTypes.func.isRequired,\n intl: PropTypes.object.isRequired,\n }\n\n state = {\n loading: false,\n oembed: null,\n };\n\n componentDidMount () {\n const { url } = this.props;\n\n this.setState({ loading: true });\n\n api().post('/api/web/embed', { url }).then(res => {\n this.setState({ loading: false, oembed: res.data });\n\n const iframeDocument = this.iframe.contentWindow.document;\n\n iframeDocument.open();\n iframeDocument.write(res.data.html);\n iframeDocument.close();\n\n iframeDocument.body.style.margin = 0;\n this.iframe.width = iframeDocument.body.scrollWidth;\n this.iframe.height = iframeDocument.body.scrollHeight;\n }).catch(error => {\n this.props.onError(error);\n });\n }\n\n setIframeRef = c => {\n this.iframe = c;\n }\n\n handleTextareaClick = (e) => {\n e.target.select();\n }\n\n render () {\n const { oembed } = this.state;\n\n return (\n
\n
\n
\n
\n