From 931aae5134cad80bf7f5ba87fe215a03761f081b Mon Sep 17 00:00:00 2001 From: retoor Date: Wed, 29 Jan 2025 02:45:18 +0100 Subject: [PATCH] New padding. --- src/snek/static/html-frame.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/snek/static/html-frame.js b/src/snek/static/html-frame.js index 75f800e..8198a37 100644 --- a/src/snek/static/html-frame.js +++ b/src/snek/static/html-frame.js @@ -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());