New padding.

This commit is contained in:
retoor 2025-01-29 02:45:18 +01:00
parent 0e821f8b58
commit 931aae5134

View File

@ -10,7 +10,10 @@ class HTMLFrame extends HTMLElement {
this.container.classList.add("html_frame")
const url = this.getAttribute('url');
if (url) {
const fullUrl = url.startsWith("/") ? window.location.origin + url : new URL(window.location.origin + "/http-get")
let fullUrl = url.startsWith("/") ? window.location.origin + url : new URL(window.location.origin + "/http-get")
if(!fullUrl.startsWith("https")){
fullUrl = "https://" + fullUrl
}
if(!url.startsWith("/"))
fullUrl.searchParams.set('url', url)
this.loadAndRender(fullUrl.toString());