trying to fix cors error
This commit is contained in:
parent
2648778341
commit
fdf00f96de
|
|
@ -5,7 +5,7 @@
|
||||||
"icon": "./icon.svg"
|
"icon": "./icon.svg"
|
||||||
},
|
},
|
||||||
"name": "logseq-mermaid-plugin",
|
"name": "logseq-mermaid-plugin",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.html",
|
"main": "dist/index.html",
|
||||||
"targets": {
|
"targets": {
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ export const convert = async (data: string) => {
|
||||||
const jsonString = btoa(toDecode);
|
const jsonString = btoa(toDecode);
|
||||||
|
|
||||||
let status = '';
|
let status = '';
|
||||||
await fetch(`https://mermaid.ink/img/${jsonString}`, { method: 'HEAD' })
|
await fetch(`https://mermaid.ink/img/${jsonString}`, { method: 'GET' })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
status = `<img src="https://mermaid.ink/img/${jsonString}" />`;
|
status = `<img src="https://mermaid.ink/img/${jsonString}" />`;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue