fix: 🚨 Vite doesn't like injected script

This commit is contained in:
ThatOneCalculator 2023-07-03 01:03:53 -07:00
parent b02bb19b7b
commit c304242e56
No known key found for this signature in database
GPG key ID: 8703CACD01000000

View file

@ -15,15 +15,14 @@
primary primary
full full
@click="copyToClipboard(codeblock); $refs.modal.close()" @click="copyToClipboard(codeblock); $refs.modal.close()"
>{{ i18n.ts.copyContent }}</MkButton >{{ i18n.ts.copyContent }}
> </MkButton>
<MkButton <MkButton
:class="$style.gotIt"
primary primary
full full
@click="$refs.modal.close()" @click="$refs.modal.close()"
>{{ i18n.ts.gotIt }}</MkButton >{{ i18n.ts.gotIt }}
> </MkButton>
</div> </div>
</div> </div>
</MkModal> </MkModal>
@ -49,7 +48,7 @@ const props = withDefaults(
} }
); );
const codeblock = `<iframe src="https://${host}/notes/${props.id}/embed" class="embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><script src="https://${host}/static-assets/embed.js" async="async"></script>` const codeblock = `<iframe src="https://${host}/notes/${props.id}/embed" class="embed" style="max-width: 100%; border: 0" width="400" allowfullscreen="allowfullscreen"></iframe><scr` + `ipt src="https://${host}/static-assets/embed.js" async="async"></scr` + `ipt>`;
</script> </script>
<style lang="scss" module> <style lang="scss" module>