Skip to content

Commit fc0e48f

Browse files
authored
Merge pull request #2 from yigblst/patch-2
Update widget.js
2 parents a5e2afb + 7c91760 commit fc0e48f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/widget.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
showFile();
3030
});
3131

32-
export function showFile(domain) {
32+
function showFile() {
3333
let fileType = blstFile.type;
3434
let validExtensions = ["application/json"];
3535
if (validExtensions.includes(fileType)) {
@@ -49,7 +49,7 @@ export function showFile(domain) {
4949
}).then((response) => response.json()).then((data) => {
5050
let tmp = dropArea.innerHTML;
5151
const a = document.createElement("a");
52-
a.href = `https://www.blstsecurity.com/ScanSwagger/${data.scan_id}?tab=Overview&promo=apibrief#${domain}`;
52+
a.href = `https://www.blstsecurity.com/ScanSwagger/${data.scan_id}?tab=Overview&promo=apibrief#${document.referrer}`;
5353
a.target = "_blank";
5454
a.rel = "noopener noreferrer";
5555
document.body.appendChild(a);

0 commit comments

Comments
 (0)