Not sure how to inject JavaScript using Web Bridge to retrieve text
This is the JavaScript that needs to be run
Blockquote
(function() { // Extract the text content of the specific element var text = document.querySelector("#node-14 > td:nth-child(3)").textContent; // Send the extracted text back to Thunkable window.postMessage(text, "*"); })();
Blockquote
I’m not sure what the solution is, but I don’t believe that IP address is publicly accessible, so the app can’t make the request.
1 Like
Hello @ocnuybearp
Welcome to the community
Why do you need the web viewer URL?
Could you please describe what you are trying to accomplish with JavaScript code?
I use it to extract text from https://openhardwaremonitor.org/
The server runs on local network on port 8085 and needed to extract only the CPU package and GPU temperatures and display it on my phone. You cannot just simply extract the source code, JavaScript needs to run locally before the values is available as text.