<meta charset="UTF-8">

This commit is contained in:
fred 2023-08-30 21:06:51 +02:00
parent 7af32ab03d
commit 44caf28880
1 changed files with 1 additions and 13 deletions

View File

@ -1,6 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Quadratic Funding Calculator</title>
<style>
.matchingAmount,
@ -141,20 +142,7 @@ let quadraticFunding = {
projects: [],
};
// Update URL parameters on changes
function updateUrl() {
let params = new URLSearchParams();
params.set("match", quadraticFunding.matchAmount);
quadraticFunding.projects.forEach((project, i) => {
params.append("grant", project.contributions.join("-"));
});
// Update the URL only if it differs from the current state
if (window.location.search !== "?" + params.toString()) {
window.history.replaceState({}, "", "?" + params.toString());
}
}
let matchAmountInput = $("<input>")
.attr("id", "matchAmount")