Conversation
Signed-off-by: Anuskuss <anuskuss@googlemail.com>
|
I see in which direction you are heading but I'm not agreeing on the solution. The
const url = encodeURI("https://pi.hole/queries?client_ip=") + encodeURIComponent(the_ip_address);We leave off the former This function should replace further |
|
Quoting from MDN:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent |
|
I don't think that IP addresses need to be encoded at all because they can only contain encodeURIComponent(client.ip).replace('%3A',':') |
|
Sorry for the massive delay in replying. The real issue is cosmetic: |
|
It is cosmetic and "not needed" per se but my brain is not a computer and trying to quickly go through the top clients becomes a chore. Interestingly enough this seems to be mostly an issue in Chrome; Firefox displays the decoded string when hovering over the clients. |
Are you able to read this:
https://pi.hole/queries?client_ip=fe80%3A%3A3aa3%3Aa33a%3A3a3a%3Aa3a3?Well neither am I.
(Feel free to close and "steal" the code. It's a single line anyway.)