diff --git a/README.md b/README.md index c3a4ffb..86a6889 100644 --- a/README.md +++ b/README.md @@ -8,20 +8,24 @@ This plugin is a very small javascript library which gives you the ability to write clever and specific CSS rules to refine your website design for each different browser, platform, device and operating system. -*It has a really small footprint and doesn't have any library dependencies such as: jQuery, Mootools, (...). So, -you can use it alone, or combined with those packages.* +_It has a really small footprint and doesn't have any library dependencies such as: jQuery, Mootools, (...). So, +you can use it alone, or combined with those packages._ ## Get started -### 1. Get the source code +### 1. Get the source code or install it via `npm` Start by cloning this repository to your local machine, or just download the source-code into any folder of your PC. As an open-source, the source-code is available in its natural format and minified. +or simply run this command in your terminal + +`sh $ npm install -S detectr.js` + ### 2. Copy necessary files -Copy the ```detectr.min.js``` (minified) file to any directory of your website +Import or copy the `dist/detectr.js` (minified) file to any directory of your website or app. For example: ``` @@ -29,13 +33,13 @@ or app. For example: |-- img/ |-- css/ |-- js/ -| |-- detectr.min.js +| |-- detectr.js |-- index.html ``` ### 3. Import the library -Import the library in your HTML files. +Import the library in your HTML files. Since it is intended to help you create better designs by empower your control on CSS rules according to used browsers, I strongly recommend you to import @@ -47,7 +51,7 @@ E.g: ... - + ... @@ -76,80 +80,80 @@ Detectr.js may add the following classes in the HTML tag: ### Browsers -| Class | Remark | -|-------|--------| -|.edge | Microsoft Edge | -|.ie | Internet Explorer | -|.ie{version} | E.g. ie10. | -|.webkit | Browsers based on the webkit | -|.iron | Iron Web Browser| -|.chrome | Google Chrome | -|.chrome{version} | E.g. chrome23 | -|.firefox | Firefox Browser | -|.firefox{version} | E.g. firefox32 | -|.opera | Opera Browser | -|.opera{version} | E.g. opera16 | -|.konqueror | Konqueror Browser | -|.safari | Safari Browser | -|.safari{version} | E.g. safari12 | -|.gecko | Browsers based on gecko | -|.android-browser | Android native browsers | +| Class | Remark | +| ----------------- | ---------------------------- | +| .edge | Microsoft Edge | +| .ie | Internet Explorer | +| .ie{version} | E.g. ie10. | +| .webkit | Browsers based on the webkit | +| .iron | Iron Web Browser | +| .chrome | Google Chrome | +| .chrome{version} | E.g. chrome23 | +| .firefox | Firefox Browser | +| .firefox{version} | E.g. firefox32 | +| .opera | Opera Browser | +| .opera{version} | E.g. opera16 | +| .konqueror | Konqueror Browser | +| .safari | Safari Browser | +| .safari{version} | E.g. safari12 | +| .gecko | Browsers based on gecko | +| .android-browser | Android native browsers | ### Operating Systems -| Class | Remark | -|-------|--------| -|.mac | Apple Macintosh | -|.osx{version} | E.g. osx10_10 | -|.ios{version} | E.g. ios8 | -|.windows | Microsoft Windows | -|.win2k | Microsoft Windows 2000 | -|.win2k.sp1 | Microsoft Windows 2000 SP1 | -|.xp | Microsoft Windows XP | -|.vista | Microsoft Windows Vista | -|.win7 | Microsoft Windows 7 | -|.win8 | Microsoft Windows 8 | -|.win8_1 | Microsoft Windows 8.1 | -|.win10 | Microsoft Windows 10 | -|.nt | Microsoft Windows NT | -|.nt{version} | E.g. nt6.1| -|.webtv | Web TV | -|.freebsd | Freebsd | -|.linux | Linux | -|.android | Android | -|.bb{version} | E.g. bb10 (for Blackberry 10) | +| Class | Remark | +| ------------- | ----------------------------- | +| .mac | Apple Macintosh | +| .osx{version} | E.g. osx10_10 | +| .ios{version} | E.g. ios8 | +| .windows | Microsoft Windows | +| .win2k | Microsoft Windows 2000 | +| .win2k.sp1 | Microsoft Windows 2000 SP1 | +| .xp | Microsoft Windows XP | +| .vista | Microsoft Windows Vista | +| .win7 | Microsoft Windows 7 | +| .win8 | Microsoft Windows 8 | +| .win8_1 | Microsoft Windows 8.1 | +| .win10 | Microsoft Windows 10 | +| .nt | Microsoft Windows NT | +| .nt{version} | E.g. nt6.1 | +| .webtv | Web TV | +| .freebsd | Freebsd | +| .linux | Linux | +| .android | Android | +| .bb{version} | E.g. bb10 (for Blackberry 10) | ### Platform -| Class | Remark | -|-------|--------| -|.x32 | Platform 32 bits | -|.x64 | Platform 64 bits | -|.arm | Platform ARM | +| Class | Remark | +| ----- | ---------------- | +| .x32 | Platform 32 bits | +| .x64 | Platform 64 bits | +| .arm | Platform ARM | ### Devices -| Class | Remark | -|-------|--------| -|.j2me | | -|.iphone | Apple iPhone | -|.ipad | Apple iPad | -|.ipod | Apple iPod | -|.mobile | Any mobile device | -|.blackberry | Blackberry | +| Class | Remark | +| ----------- | ----------------- | +| .j2me | | +| .iphone | Apple iPhone | +| .ipad | Apple iPad | +| .ipod | Apple iPod | +| .mobile | Any mobile device | +| .blackberry | Blackberry | ### Other -| Class | Remark | -|-------|--------| -|.touch | Touch screen devices | -|.js | Javascript supported | -|.svg | SVG Images supported | -|.no-svg | SVG Images NOT supported | -|.retina | Devices with pixelratio > 1 | -|.no-retina | Devices with pixelration = 1| -|.portrait | Portrait orientation | -|.landscape | Landscape orientation | +| Class | Remark | +| ---------- | ---------------------------- | +| .touch | Touch screen devices | +| .js | Javascript supported | +| .svg | SVG Images supported | +| .no-svg | SVG Images NOT supported | +| .retina | Devices with pixelratio > 1 | +| .no-retina | Devices with pixelration = 1 | +| .portrait | Portrait orientation | +| .landscape | Landscape orientation | ## Inspiration @@ -161,7 +165,7 @@ since Nov 2nd, 2010. This projec is licensed under MIT License. -Copyright (c) 2015 Rogério Taques +Copyright (c) 2015-2019 Rogério Taques Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal