diff --git a/src/components/Links.svelte b/src/components/Links.svelte index 07ed2f95..43b80979 100755 --- a/src/components/Links.svelte +++ b/src/components/Links.svelte @@ -50,6 +50,10 @@ }; }; + const isClipboardAvailable = () => { + return window.hasOwnProperty('ClipboardItem'); + }; + const clipboardCopy = (canvas, context, image) => { return () => { context.drawImage(image, 0, 0, canvas.width, canvas.height); @@ -101,7 +105,7 @@ const unsubscribe = codeStore.subscribe((state) => { b64Code = Base64.encodeURI(JSON.stringify(state)); - url = `${window.location.pathname.split("#")[0]}#/view/${b64Code}`; + url = `${window.location.pathname.split('#')[0]}#/view/${b64Code}`; iUrl = `https://mermaid.ink/img/${b64Code}`; svgUrl = `https://mermaid.ink/svg/${b64Code}`; mdCode = `[](${window.location.protocol}//${window.location.host}${window.location.pathname}#/edit/${b64Code})`; @@ -159,11 +163,13 @@
-
+
-
+
+ disabled={imagemodeselected !== 'width'} />