Skip to content

Commit

Permalink
Added Kindle/Silk
Browse files Browse the repository at this point in the history
  • Loading branch information
verbatim committed Jan 26, 2012
1 parent 270496a commit 5ad97f0
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 11 deletions.
36 changes: 29 additions & 7 deletions README.mkdn
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Identifies
<br />enabled technology: JS (use in conjunction with &lt;html class="no-js"> for even more granular control)
<br />language detection

contributors to 0.5, 0.6, 0.6.5:
Recent contributors to 0.5, 0.6:

more detailed IE detection:
<br />https://github.com/kevingessner/css_browser_selector/
Expand All @@ -29,9 +29,7 @@ no-js to js:
mac versioning
<br />https://github.com/haraldmartin/css_browser_selector

andrew relkin

v0.6.0 2012-??-??
v0.6.0 2012-01-24
<br />more detailed support for Opera, Chrome, Safari (and revised support for Firefox)
<br />versioning for Chrome, Blackberry, Android, Mac
<br />Android device detection
Expand Down Expand Up @@ -61,7 +59,7 @@ history of the user agent string:
language list:
<br />http://msdn.microsoft.com/en-us/library/ms533052%28v=vs.85%29.aspx

nt list
windows nt list
<br />http://en.wikipedia.org/wiki/Windows_NT

blackberry user agent string interpertation:
Expand Down Expand Up @@ -114,5 +112,29 @@ Based on idea by 37signals:
<br />http://37signals.com/svn/archives2/browser_selectors_in_css.php

Contributors:
<br />http://rafael.adm.br/css_browser_selector#contributors

<br />Niyaz (http://github.com/niyazpk)
<br />Marcio Trindade (http://github.com/marciotrindade)
<br />rbottarelli (http://github.com/rbottarelli)
<br />Bryan Chow (http://github.com/bryanchow)
<br />Derek Lio (http://github.com/dereklio)
<br />Paul Irish (http://github.com/paulirish)
<br />Preston Badeer
<br />Upekshapriya
<br />André Lopes
<br />Tazio Mirandola - copiaincolla pubblicità
<br />Reid MacDonald (http://geminstallthat.wordpress.com)
<br />Vinicius Braga (http://viniciusbraga.com)
<br />Chris Preece (http://www.mmtdigital.co.uk)
<br />Dominykas
<br />M@ McCray
<br />Daniel Westermann-Clark
<br />Steve Clay (http://mrclay.org/)
<br />Jeff Bellsey
<br />Jean Pierre
<br />Micah Snyder
<br />Derek (http://amphibian.info)
<br />Jesse Scott
<br />Moises Kirsch (http://www.moiblog.com/)
<br />Alex Wiltschko
<br />Chris Warren and Tony Nelson (http://www.imagetrend.com)
<br />glasser
10 changes: 6 additions & 4 deletions css_browser_selector_dev.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/*
CSS Browser Selector 0.6.5
CSS Browser Selector 0.6.0
Originally written by Rafael Lima (http://rafael.adm.br)
http://rafael.adm.br/css_browser_selector
License: http://creativecommons.org/licenses/by/2.5/
Contributors: http://rafael.adm.br/css_browser_selector#contributors
Co-maintained by:
https://github.com/verbatim/css_browser_selector
Expand All @@ -19,7 +18,6 @@ function css_browser_selector(u)
screens = [320, 480, 640, 768, 1024, 1152, 1280, 1440, 1680, 1920, 2560],
allScreens = screens.length,
ua=u.toLowerCase(),
//is=function(t) { ua.indexOf(t.toLowerCase())>-1 },
is=function(t) { return RegExp(t,"i").test(ua); },
g='gecko',
w='webkit',
Expand All @@ -32,6 +30,7 @@ function css_browser_selector(u)
bb='blackberry',
lang='lang_',
d='device_',
ms='windows',
html=document.documentElement,
b= [

Expand All @@ -53,12 +52,14 @@ function css_browser_selector(u)
// MIDP and CLDC:
// not sure what these represent but have put in until someone can
// tell me they aren't necessary for the purposes of this plugin
/*
+ ( /MIDP-((\d+)\.(\d+))/i.test(ua)
? " midp"+ RegExp.$2 + " midp"+ RegExp.$1.replace('.','_')
:'' )
+ ( /CLDC-((\d+)\.(\d+))/i.test(ua)
? " cldc"+ RegExp.$2 + " cldc"+ RegExp.$1.replace('.','_')
:'' )
*/
)

:is('android') ?
Expand Down Expand Up @@ -94,14 +95,15 @@ function css_browser_selector(u)
:''

// mobile
,is("mobi|mobile|j2me|iphone|ipod|ipad|blackberry|playbook")?m:''
,is("mobi|mobile|j2me|iphone|ipod|ipad|blackberry|playbook|kindle|silk")?m:''

// os/platform
,is('j2me')?'j2me'
:is('iphone')?'iphone'
:is('ipod')?'ipod'
:is('ipad')?'ipad'
:is('playbook')?'playbook'
:is('kindle|silk')?'kindle'
:is('mac')?'mac'+ (/mac os x ((\d+)[.|_](\d+))/.test(ua) ? ' mac' + (RegExp.$1).replace('.',"_") : '' )
:is('win')?'win'+
(is('windows nt 6.2')?' win8'
Expand Down

0 comments on commit 5ad97f0

Please sign in to comment.