Advertisement
BrU32

JS Wifi Connection Type Detection SRC

Sep 29th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <script>
  2. navigator.connection.addEventListener('change',function(){
  3. var type = navigator.connection.type;
  4. if(type=='wifi'){
  5. document.writeln(type+' <br>');
  6. }
  7. if(type=='disconnected'){
  8. document.writeln(type+' <br>');
  9. }
  10. if(type=='none'){
  11. document.writeln(type+' <br>');
  12. }
  13. if(type=='bluetooth'){
  14. document.writeln(type+' <br>');
  15. }
  16. if(type=='wiimax'){
  17. document.writeln(type+' <br>');
  18. }
  19. if(type=='ethernet'){
  20. document.writeln(type+' <br>');
  21. }
  22. if(type=='mixed'){
  23. document.writeln(type+' <br>');
  24. }
  25. if(type=='unknown'){
  26. document.writeln(type+' <br>');
  27. }
  28. if(type=='other'){
  29. document.writeln(type+' <br>');
  30. }
  31. });
  32. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement