MCPcopy Index your code
hub / github.com/mailvelope/mailvelope / init

Function init

src/components/editor/editorRoot.js:23–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

21l10n.mapToLocal();
22
23function init() {
24 const query = new URLSearchParams(document.location.search);
25 // component id
26 const id = query.get('id') || '';
27 // attachment max file size
28 const quota = parseInt(query.get('quota'));
29 let maxFileUploadSize = MAX_FILE_UPLOAD_SIZE;
30 if (quota && quota < maxFileUploadSize) {
31 maxFileUploadSize = quota;
32 }
33 addDocumentTitle(`Mailvelope - ${l10n.map.editor_header}`);
34 const root = document.createElement('div');
35 ReactDOM.render(
36 (<Editor id={id} maxFileUploadSize={maxFileUploadSize} />),
37 document.body.appendChild(root)
38 );
39}

Callers

nothing calls this directly

Calls 2

addDocumentTitleFunction · 0.90
getMethod · 0.45

Tested by

no test coverage detected