From a3ecd6addcd45cbe1bbca6bb9794c941a6c68158 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Mon, 27 Nov 2023 21:24:26 +0530 Subject: [PATCH] (feat): made embed code dynamicaly genrated for every page --- htdocs/assets/_floatingbar.php | 2 +- htdocs/assets/js/floatingbar-config.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/assets/_floatingbar.php b/htdocs/assets/_floatingbar.php index f774a66..10b5386 100644 --- a/htdocs/assets/_floatingbar.php +++ b/htdocs/assets/_floatingbar.php @@ -126,7 +126,7 @@

EMBED THIS PAGE

-
<iframe
src="https://localhost/neosubhamoy/htdocs/projects"
height="200"
width="300"
title="test iframe"></iframe>
+
<iframe
src="https://neosubhamoy.dev"
height="200"
width="300"
title="test iframe"></iframe>
diff --git a/htdocs/assets/js/floatingbar-config.js b/htdocs/assets/js/floatingbar-config.js index 3680f5a..6590fa0 100644 --- a/htdocs/assets/js/floatingbar-config.js +++ b/htdocs/assets/js/floatingbar-config.js @@ -14,6 +14,7 @@ const searchDef = document.getElementById("defresults"); const searchRes = document.getElementById("searchresults"); const qrCode = document.getElementById("pageqrcode"); const linkInput = document.getElementById("pageurlinput"); +const embedCode = document.getElementById("embedcodetag"); const basePath = document.getElementById('phpHostBasePath').dataset.basePath; let lastScrollTop = 0; @@ -308,6 +309,8 @@ function activate_share() { qrCode.src = "https://api.qrserver.com/v1/create-qr-code/?data=" + window.location.href + "&color=38BDF8&bgcolor=0F172A"; //change pageUrlInput value to current page linkInput.value = window.location.href; + //genrate embed code for current page link + embedCode.innerHTML = '<iframe src="' + window.location.href + '" height="200" width="300" title="embed-neosubhamoy-portfolio"></iframe>'; windowWrapper.classList.remove("hidden"); windowWrapper.classList.add("flotingbar-window-wrapper-show"); shareBtn.classList.add("hidden");