SatSale

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 879fb4d85fb581b328d5441ce074040bf82b7aa6
parent 8573ca0b17f750680accb2e45feaf0b8d0ad910c
Author: NicholasFarrow <nicholas.w.farrow@gmail.com>
Date:   Thu,  4 Feb 2021 23:17:58 +1100

Add replace URL function, reload with different arguments

Diffstat:
Mstatic/server_connection.js | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/static/server_connection.js b/static/server_connection.js @@ -55,6 +55,15 @@ function conditionalPageLogic(msg) { } } +function replaceUrlParam(url, paramName, paramValue) +{ + console.log(url); + var href = new URL(url); + href.searchParams.set(paramName, paramValue); + window.location = href; + return +} + // Payment timer, can't go below zero, update every second intervalTimer = setInterval(function () { var currentTime = document.getElementById('timer').innerHTML;