From 7c91760779f621ed82e9f3fa6855526bd9183e41 Mon Sep 17 00:00:00 2001 From: yigblst <94439167+yigblst@users.noreply.github.com> Date: Wed, 11 May 2022 12:48:25 +0300 Subject: [PATCH] Update widget.js --- src/widget.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widget.js b/src/widget.js index 61fd9d0..bc1461e 100644 --- a/src/widget.js +++ b/src/widget.js @@ -29,7 +29,7 @@ showFile(); }); -export function showFile(domain) { +function showFile() { let fileType = blstFile.type; let validExtensions = ["application/json"]; if (validExtensions.includes(fileType)) { @@ -49,7 +49,7 @@ export function showFile(domain) { }).then((response) => response.json()).then((data) => { let tmp = dropArea.innerHTML; const a = document.createElement("a"); - a.href = `https://www.blstsecurity.com/ScanSwagger/${data.scan_id}?tab=Overview&promo=apibrief#${domain}`; + a.href = `https://www.blstsecurity.com/ScanSwagger/${data.scan_id}?tab=Overview&promo=apibrief#${document.referrer}`; a.target = "_blank"; a.rel = "noopener noreferrer"; document.body.appendChild(a);