metectjs

0.3.0 • Public • Published

MetectJS

The MetectJS library to detect os and mobile devices

Add this code to your .html files

<script type="text/javascript" src="metect.js"></script>
<script type="text/javascript">
    metect({
  		window: function(){//This code runs when detects Windows OS}

  		mac: function(){//This code runs when detects Mac OS}
  	
  		linux: function(){//This code runs when detects Linux OS}
  
  		mobile: function(){//This code runs when detects mobile devices}
  
  		unix: function(){//This code runs when detects Unix OS}

      safari: function(){//This code runs when detects Safari browser}

      chrome: function(){//This code runs when detects Chromes browser}

      firefox: function(){//This code runs when detects Firefox browser}
      
      opera: function(){//This code runs when detects Opera browser}

      msie: function(){//This code runs when detects Microsoft Internet Explorer browser}
	    })

  //You can log the info of version, browser, os to the console by using medetect();
</script>

Readme

Keywords

Package Sidebar

Install

npm i metectjs

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

10.6 kB

Total Files

10

Last publish

Collaborators

  • xixdev