<div class="js--show">

    <div class="pym-interactive{{#if_eq full-width "true"}} pym-interactive--full-width{{/if_eq}}" id="{{id}}" data-url="{{url}}"></div>

    <details class="details">
        <summary class="details__summary">Embed code</summary>
        <div class="details__body">
            <label class="embed-code__label" for="embed-{{id}}">Embed this interactive</label>
            <input class="embed-code__code width-md--32"
        value='<iframe width="100%" src="{{#if (containsAny url "http" "https")}}{{url}}{{else}}https://{{location.hostname}}{{url}}{{/if}}"></iframe>'
                   id="embed-{{id}}"
                   name="embed-{{id}}"
                   readonly
            />
            <span class="embed-code__success-container">
                <button id="" data-id="{{id}}" type="button" class="btn btn--primary embed-code__button js-embed-code-copy">Copy</button>
                <span role="status"></span>
            </span>
        </div>
    </details>

</div>

<div class="js--show">

    <div class="pym-interactive{{#if_eq full-width "true"}} pym-interactive--full-width{{/if_eq}}" id="{{id}}" data-url="{{url}}"></div>

    <details class="details">
        <summary class="details__summary">Embed code</summary>
        <div class="details__body">
            <label class="embed-code__label" for="embed-{{id}}">Embed this interactive</label>
            <input class="embed-code__code width-md--32"
        value='<iframe width="100%" src="{{#if (containsAny url "http" "https")}}{{url}}{{else}}https://{{location.host}}{{url}}{{/if}}"></iframe>'
                   id="embed-{{id}}"
                   name="embed-{{id}}"
                   readonly
            />
            <span class="embed-code__success-container">
                <button id="" data-id="{{id}}" type="button" class="btn btn--primary embed-code__button js-embed-code-copy">Copy</button>
                <span role="status"></span>
            </span>
        </div>
    </details>

</div>

Use host instead of hostname
Use host instead of hostname
