Created
December 1, 2019 21:31
-
-
Save RobinLinus/732b2f9bc0d82b13767672e28e77327b to your computer and use it in GitHub Desktop.
Detect if the client's router is a FritzBox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function isFritzBox(){ | |
return new Promise(resolve =>{ | |
let img = document.createElement('img'); | |
img.onload = _ => resolve(true); | |
img.onerror = _ => resolve(false); | |
img.src = 'http://fritz.box/favicon.ico'; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment