diff --git a/application/assets/js/helper.js b/application/assets/js/helper.js
index 7edcdfc..81ba783 100644
--- a/application/assets/js/helper.js
+++ b/application/assets/js/helper.js
@@ -113,27 +113,6 @@ const helper = (() => {
}, time);
};
- //get location by ip
- let geoip = function (callback, key) {
- const url = "https://api.ipbase.com/v2/info?apikey=" + key;
- let xhr = new XMLHttpRequest();
- xhr.open("GET", url);
- xhr.responseType = "json";
- xhr.send();
- xhr.error = function (err) {
- helper.side_toaster(err, 3000);
- };
-
- xhr.onload = function () {
- let responseObj = xhr.response;
- let latlng = [
- responseObj.data.location.latitude,
- responseObj.data.location.longitude,
- ];
- callback(latlng);
- };
- };
-
//delete file
let deleteFile = function (filename) {
let sdcard = "";
@@ -411,7 +390,6 @@ const helper = (() => {
add_script,
deleteFile,
isOnline,
- geoip,
side_toaster,
renameFile,
downloadFile,
diff --git a/application/assets/js/module.js b/application/assets/js/module.js
index 9a1776c..4eea9a9 100644
--- a/application/assets/js/module.js
+++ b/application/assets/js/module.js
@@ -761,32 +761,6 @@ const module = (() => {
function calculateGainAndLoss(altitudes) {
let gain = 0;
let loss = 0;
- /*
- let previousValidAltitude = null;
-
- for (let i = 0; i < altitudes.length; i++) {
- const currentAltitude = altitudes[i];
-
- // Skip null or inaccurate altitude values
- if (currentAltitude === null || isNaN(currentAltitude)) {
- continue;
- }
-
- if (previousValidAltitude !== null) {
- const altitudeDifference = currentAltitude - previousValidAltitude;
-
- if (Math.abs(altitudeDifference) <= threshold) {
- if (altitudeDifference > 0) {
- gain += altitudeDifference;
- } else {
- loss += Math.abs(altitudeDifference);
- }
- }
- }
-
- previousValidAltitude = currentAltitude;
- }
- */
const highestAltitude = Math.max(...altitudes);
const lowestAltitude = Math.min(...altitudes);
diff --git a/application/index.js b/application/index.js
index 23907bc..65e2414 100644
--- a/application/index.js
+++ b/application/index.js
@@ -420,6 +420,13 @@ document.addEventListener("DOMContentLoaded", function () {
'
Bar
'
);
+ document
+ .querySelector("div#overpass")
+ .insertAdjacentHTML(
+ "afterend",
+ 'Toilets
'
+ );
+
document
.querySelector("div#overpass")
.insertAdjacentHTML(
diff --git a/docs/assets/js/helper.js b/docs/assets/js/helper.js
index 7edcdfc..81ba783 100644
--- a/docs/assets/js/helper.js
+++ b/docs/assets/js/helper.js
@@ -113,27 +113,6 @@ const helper = (() => {
}, time);
};
- //get location by ip
- let geoip = function (callback, key) {
- const url = "https://api.ipbase.com/v2/info?apikey=" + key;
- let xhr = new XMLHttpRequest();
- xhr.open("GET", url);
- xhr.responseType = "json";
- xhr.send();
- xhr.error = function (err) {
- helper.side_toaster(err, 3000);
- };
-
- xhr.onload = function () {
- let responseObj = xhr.response;
- let latlng = [
- responseObj.data.location.latitude,
- responseObj.data.location.longitude,
- ];
- callback(latlng);
- };
- };
-
//delete file
let deleteFile = function (filename) {
let sdcard = "";
@@ -411,7 +390,6 @@ const helper = (() => {
add_script,
deleteFile,
isOnline,
- geoip,
side_toaster,
renameFile,
downloadFile,
diff --git a/docs/assets/js/module.js b/docs/assets/js/module.js
index 9a1776c..4eea9a9 100644
--- a/docs/assets/js/module.js
+++ b/docs/assets/js/module.js
@@ -761,32 +761,6 @@ const module = (() => {
function calculateGainAndLoss(altitudes) {
let gain = 0;
let loss = 0;
- /*
- let previousValidAltitude = null;
-
- for (let i = 0; i < altitudes.length; i++) {
- const currentAltitude = altitudes[i];
-
- // Skip null or inaccurate altitude values
- if (currentAltitude === null || isNaN(currentAltitude)) {
- continue;
- }
-
- if (previousValidAltitude !== null) {
- const altitudeDifference = currentAltitude - previousValidAltitude;
-
- if (Math.abs(altitudeDifference) <= threshold) {
- if (altitudeDifference > 0) {
- gain += altitudeDifference;
- } else {
- loss += Math.abs(altitudeDifference);
- }
- }
- }
-
- previousValidAltitude = currentAltitude;
- }
- */
const highestAltitude = Math.max(...altitudes);
const lowestAltitude = Math.min(...altitudes);
diff --git a/docs/index.js b/docs/index.js
index 23907bc..65e2414 100644
--- a/docs/index.js
+++ b/docs/index.js
@@ -420,6 +420,13 @@ document.addEventListener("DOMContentLoaded", function () {
'Bar
'
);
+ document
+ .querySelector("div#overpass")
+ .insertAdjacentHTML(
+ "afterend",
+ 'Toilets
'
+ );
+
document
.querySelector("div#overpass")
.insertAdjacentHTML(