Skip to content

Commit

Permalink
Fixed issue with duplicated query params
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasJejkal committed Oct 21, 2022
1 parent 1463999 commit c9b938b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,11 @@ <h4 class="ui header">
let badgeUrl = "https://img.shields.io/badge/FAIR%20DO-" + encodeURIComponent(pid).replaceAll("-", "--") + "-green?logo=data:image/png;base64," + logo_encoded;
let result = undefined;

let targetUrl = window.location.href + "?pid=" + pid;

let url = new URL(window.location.href);
url.searchParams["pid"] = pid;

let targetUrl = url.toString();

if(type == "html"){
result = "<a href='" + targetUrl + "'><img src='" + badgeUrl + "'></img></a>";
Expand Down

0 comments on commit c9b938b

Please sign in to comment.