MCPcopy
hub / github.com/mailvelope/mailvelope / getTargetOrigin

Function getTargetOrigin

src/content-scripts/clientAPI.js:38–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36}
37
38function getTargetOrigin() {
39 const origin = window.location.origin;
40 // Dev mode: Use wildcard for file protocol, otherwise use normal origin
41 if (typeof __DEV_MODE__ !== 'undefined' && __DEV_MODE__ && origin === 'file://') {
42 return '*';
43 }
44 return origin;
45}
46
47export function init() {
48 const apiTag = document.getElementById('mailvelope-api');

Callers 1

postMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected