seapoe1809 commited on
Commit
9f5e936
·
verified ·
1 Parent(s): 3a5b723

Upload 4 files

Browse files
static/Ibs_Module_script.js CHANGED
@@ -1,12 +1,16 @@
1
  document.addEventListener('DOMContentLoaded', function() {
2
- var link = document.getElementById('Ibs_Module-link');
3
- var currentIp = window.location.hostname; // Get the current IP address
4
- var newPort = '3024'; // New port number
5
-
6
- link.addEventListener('click', function(event) {
7
- event.preventDefault();
8
- var newUrl = 'http://' + currentIp + ':' + newPort;
9
- window.open(newUrl, '_blank');
10
- });
11
- });
 
 
 
 
12
 
 
1
  document.addEventListener('DOMContentLoaded', function() {
2
+ const appInfo = {
3
+ App_name: 'Ibs_Module', // Replace with the actual app name
4
+ app_folder: 'Ibs_Module' // Replace with the actual image folder
5
+ };
6
+
7
+ // Get the install link element"""WILL be in static folder, linking to install.html and subsequently to install_module"
8
+ const installLink = document.getElementById('Ibs_Module-link');
9
+
10
+ // Add a click event handler to the link
11
+ installLink.addEventListener('click', function() {
12
+ const installUrl = `/install?app_name_file=${appInfo.App_name}&app_folder=${appInfo.app_folder}`;
13
+ window.open(installUrl, '_blank');
14
+ });
15
+ });
16
 
static/Immunization_Tracker_script.js CHANGED
@@ -1,12 +1,16 @@
1
  document.addEventListener('DOMContentLoaded', function() {
2
- var link = document.getElementById('Immunization_Tracker-link');
3
- var currentIp = window.location.hostname; // Get the current IP address
4
- var newPort = '3022'; // New port number
5
-
6
- link.addEventListener('click', function(event) {
7
- event.preventDefault();
8
- var newUrl = 'http://' + currentIp + ':' + newPort;
9
- window.open(newUrl, '_blank');
10
- });
11
- });
 
 
 
 
12
 
 
1
  document.addEventListener('DOMContentLoaded', function() {
2
+ const appInfo = {
3
+ App_name: 'Immunization_Tracker', // Replace with the actual app name
4
+ app_folder: 'Immunization_Tracker' // Replace with the actual image folder
5
+ };
6
+
7
+ // Get the install link element"""WILL be in static folder, linking to install.html and subsequently to install_module"
8
+ const installLink = document.getElementById('Immunization_Tracker-link');
9
+
10
+ // Add a click event handler to the link
11
+ installLink.addEventListener('click', function() {
12
+ const installUrl = `/install?app_name_file=${appInfo.App_name}&app_folder=${appInfo.app_folder}`;
13
+ window.open(installUrl, '_blank');
14
+ });
15
+ });
16
 
static/Tailscale_script.js CHANGED
@@ -1,12 +1,16 @@
1
  document.addEventListener('DOMContentLoaded', function() {
2
- var link = document.getElementById('Tailscale-link');
3
- var currentIp = window.location.hostname; // Get the current IP address
4
- var newPort = '8240'; // New port number
5
-
6
- link.addEventListener('click', function(event) {
7
- event.preventDefault();
8
- var newUrl = 'http://' + currentIp + ':' + newPort;
9
- window.open(newUrl, '_blank');
10
- });
11
- });
 
 
 
 
12
 
 
1
  document.addEventListener('DOMContentLoaded', function() {
2
+ const appInfo = {
3
+ App_name: 'Tailscale', // Replace with the actual app name
4
+ app_folder: 'Tailscale' // Replace with the actual image folder
5
+ };
6
+
7
+ // Get the install link element"""WILL be in static folder, linking to install.html and subsequently to install_module"
8
+ const installLink = document.getElementById('Tailscale-link');
9
+
10
+ // Add a click event handler to the link
11
+ installLink.addEventListener('click', function() {
12
+ const installUrl = `/install?app_name_file=${appInfo.App_name}&app_folder=${appInfo.app_folder}`;
13
+ window.open(installUrl, '_blank');
14
+ });
15
+ });
16
 
static/Weight_Tracker_script.js CHANGED
@@ -1,12 +1,16 @@
1
  document.addEventListener('DOMContentLoaded', function() {
2
- var link = document.getElementById('Weight_Tracker-link');
3
- var currentIp = window.location.hostname; // Get the current IP address
4
- var newPort = '3020'; // New port number
5
-
6
- link.addEventListener('click', function(event) {
7
- event.preventDefault();
8
- var newUrl = 'http://' + currentIp + ':' + newPort;
9
- window.open(newUrl, '_blank');
10
- });
11
- });
 
 
 
 
12
 
 
1
  document.addEventListener('DOMContentLoaded', function() {
2
+ const appInfo = {
3
+ App_name: 'Weight_Tracker', // Replace with the actual app name
4
+ app_folder: 'Weight_Tracker' // Replace with the actual image folder
5
+ };
6
+
7
+ // Get the install link element"""WILL be in static folder, linking to install.html and subsequently to install_module"
8
+ const installLink = document.getElementById('Weight_Tracker-link');
9
+
10
+ // Add a click event handler to the link
11
+ installLink.addEventListener('click', function() {
12
+ const installUrl = `/install?app_name_file=${appInfo.App_name}&app_folder=${appInfo.app_folder}`;
13
+ window.open(installUrl, '_blank');
14
+ });
15
+ });
16