file_captivePortal_lna.html (818B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Captive Portal LNA Test Page</title> 6 </head> 7 <body> 8 <h1>Captive Portal LNA Test</h1> 9 <div id="result"></div> 10 11 <script type="text/javascript"> 12 window.addEventListener('load', async function () { 13 const resultDiv = document.getElementById('result'); 14 const params = new URLSearchParams(location.search); 15 const localUrl = "http://localhost:21555/?type=fetch&rand=" + (params.get("rand") || Math.random()); 16 17 try { 18 resultDiv.textContent = "Making fetch request to local server..."; 19 const response = await fetch(localUrl); 20 const text = await response.text(); 21 resultDiv.textContent = "Success: " + text; 22 } catch (error) { 23 resultDiv.textContent = "Error: " + error.message; 24 } 25 }); 26 </script> 27 </body> 28 </html>