<meta charset="UTF-8">
This commit is contained in:
parent
7af32ab03d
commit
44caf28880
14
index.html
14
index.html
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue