Removing some un-necessary duplicated statements.
This commit is contained in:
parent
8d39cccbeb
commit
3b0518296d
|
@ -15,19 +15,11 @@
|
||||||
const url = `${pluginsUrl}/${info.url}`
|
const url = `${pluginsUrl}/${info.url}`
|
||||||
const resp = await fetch(url, {
|
const resp = await fetch(url, {
|
||||||
headers: {
|
headers: {
|
||||||
pragma: "no-cache",
|
["pragma"]: "no-cache",
|
||||||
"cache-control": "no-cache",
|
["cache-control"]: "no-cache",
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
let text = await resp.text()
|
return resp.text()
|
||||||
// explicitly only want to replace the first instance
|
|
||||||
if (text.includes("height=")) {
|
|
||||||
text = text.replace(/height="\d*"/, `height="${size}"`)
|
|
||||||
}
|
|
||||||
if (text.includes("width=")) {
|
|
||||||
text = text.replace(/width="\d*"/, `width="${size}"`)
|
|
||||||
}
|
|
||||||
return text
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue