fix: Update params to allow both ssl and curl checks

This commit is contained in:
Nathan Woodburn 2025-02-27 15:08:09 +11:00
parent 964779136c
commit ec59656cad
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 18 additions and 4 deletions
templates/assets/js

View File

@ -16,8 +16,15 @@ document.addEventListener('DOMContentLoaded', function () {
}
// Update the url
const params = new URLSearchParams();
params.append('url', url);
var params;
if (window.location.search){
params = new URLSearchParams(window.location.search);
params.set('url', url);
}
else {
params = new URLSearchParams();
params.append('url', url);
}
history.pushState(null, null, `?${params.toString()}`);
// Show loading state

View File

@ -14,8 +14,15 @@ function getSSL() {
// Get the input value
const domain = document.getElementById("domain").value.trim().toLowerCase();
// Set the domain parameter
const params = new URLSearchParams();
params.append("domain", domain);
var params;
if (window.location.search){
params = new URLSearchParams(window.location.search);
params.set("domain", domain);
}
else {
params = new URLSearchParams();
params.append("domain", domain);
}
// Add the parameters to the URL
const url = `/?${params.toString()}`;
// Push the URL to the history