diff --git a/assets/js/screenshot.js b/assets/js/screenshot.js index dae9a79..207f426 100644 --- a/assets/js/screenshot.js +++ b/assets/js/screenshot.js @@ -1,8 +1,8 @@ -let url = window.location.hostname async function getFileUrl() { const params = new URLSearchParams(window.location.search) let title = params.get('photo') - let apiurl = `https://${window.location.hostname}/screenshots?title=${title}` + let apiurl = `http://${window.location.host}/screenshots?title=${title}` + let pageURL = `http://${window.location.host}/view?photo=${title}` if(title) { try{ @@ -13,7 +13,7 @@ async function getFileUrl() { document.querySelector('meta[name="img"]').setAttribute("content", photourl) document.querySelector('meta[name="title"]').setAttribute("content", `Awex's screenshot from ${dateStr}`) - document.querySelector('meta[name="url"]').setAttribute("content", url) + document.querySelector('meta[name="url"]').setAttribute("content", pageURL) document.getElementById("title").innerHTML = (`Screenshot from ${date}`) document.getElementById("date").innerHTML = (`