Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ancient browser support #82

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# v2.0.0 (2021-09-20)

- Remove old browser checks for Android 1 + 2, Silk 1
- Remove navigation.userAgent deprecation warning

# v1.1.3 (2021-06-15)

- Adds test for “Fetch”.
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ Feature.js is a fast, simple and lightweight browser feature detection library.

With [Feature.js](http://featurejs.com/), it’s simple to build progressively enhanced experiences that use feature detection to determine if a code can be executed in the user’s browser.

# Version Note

`v1.x` makes considerations for very early Android & Amazon Silk browsers whereas `v2.x` drops this support.

## How to use

Expand Down
9 changes: 2 additions & 7 deletions feature.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@
return document.createElement(el);
},

/**
* Test if it's an old device that we want to filter out
*/
old: !!(/(Android\s(1\.|2\.))|(Silk\/1\.)/i.test(nav.userAgent)),

/**
* Function that takes a standard CSS property name as a parameter and
* returns it's prefixed version valid for current browser it runs in
Expand Down Expand Up @@ -95,13 +90,13 @@
var Feature = {
// Test if CSS 3D transforms are supported
css3Dtransform: (function() {
var test = (!util.old && util.pfx('perspective') !== null);
var test = (util.pfx('perspective') !== null);
return !!test;
})(),

// Test if CSS transforms are supported
cssTransform: (function() {
var test = (!util.old && util.pfx('transformOrigin') !== null);
var test = (util.pfx('transformOrigin') !== null);
return !!test;
})(),

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "feature.js",
"version": "1.1.3",
"version": "2.0.0",
"description": "Feature.js is a fast, simple and lightweight browser feature detection library in 1kb.",
"main": "feature.js",
"directories": {
Expand Down