From ad90306a99024427011256ed99f5fe575b5f2f5f Mon Sep 17 00:00:00 2001 From: Override-6 Date: Thu, 5 Jan 2023 23:19:53 +0100 Subject: [PATCH] fixed server IP changes --- www/counter/index.html | 4 ++-- www/js/constants.js | 1 + www/{counter/index.js => js/counter.js} | 6 +++++- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 www/js/constants.js rename www/{counter/index.js => js/counter.js} (81%) diff --git a/www/counter/index.html b/www/counter/index.html index 416e58b..f5134cb 100644 --- a/www/counter/index.html +++ b/www/counter/index.html @@ -2,10 +2,10 @@ - + Counter - +
diff --git a/www/js/constants.js b/www/js/constants.js new file mode 100644 index 0000000..de364ee --- /dev/null +++ b/www/js/constants.js @@ -0,0 +1 @@ +export const ADDRESS = "92.132.64.175:950" diff --git a/www/counter/index.js b/www/js/counter.js similarity index 81% rename from www/counter/index.js rename to www/js/counter.js index b39a9cd..abc4a12 100644 --- a/www/counter/index.js +++ b/www/js/counter.js @@ -1,5 +1,9 @@ +import {ADDRESS} from "./constants.js"; + let counter = 0; -const ADDRESS = "92.132.18.192:950" + +window.onload = () => initCounter(); +window.makeIncrement = () => makeIncrement(); function updateText() { document.getElementById("counter").innerHTML = counter