Update index.js

This commit is contained in:
Nicholas Jitkoff 2022-05-20 09:56:25 -07:00
parent 1755761952
commit 6a8757cba6

View file

@ -49,7 +49,7 @@
if (e.data.title) document.title = e.data.title;
if (e.data.favicon) setFavicon(e.data.favicon);
if (e.data.updateURL) {
let path = "/" + e.data.title.replace(/\s/g, "_");
let path = "/" + e.data.title.replace(/\s/g, "-");
if (e.data.description) path += "/d/" + encodeURIComponent(e.data.description);
if (e.data.favicon) path += "/f/" + encodeURIComponent(e.data.favicon);
if (e.data.image) path += "/i/" + encodeURIComponent(btoa(e.data.image));