Skip to content

Instantly share code, notes, and snippets.

@RobinLinus
Created December 1, 2019 21:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RobinLinus/732b2f9bc0d82b13767672e28e77327b to your computer and use it in GitHub Desktop.
Save RobinLinus/732b2f9bc0d82b13767672e28e77327b to your computer and use it in GitHub Desktop.
Detect if the client's router is a FritzBox
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