Skip to content

Commit

Permalink
doc / package info after issue #10
Browse files Browse the repository at this point in the history
  • Loading branch information
hgoebl committed Jul 16, 2014
1 parent da397b4 commit 338c15d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v0.4.1:
date: <not-released-yet>
changes:
- fix issue #10 (optimization: no need to eval code before it's not required)

v0.4.0:
date: 2014-07-15
changes:
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobile-detect",
"version": "0.4.0",
"version": "0.4.1-SNAPSHOT",
"description": "Device detection (phone, tablet, desktop, mobile grade, os, versions)",
"homepage": "http://hgoebl.github.io/mobile-detect.js/",
"keywords": [
Expand Down
36 changes: 16 additions & 20 deletions mobile-detect.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// THIS FILE IS GENERATED - DO NOT EDIT!
/*global module:false, define:false*/

(function (exports, undefined) {
(function (define, undefined) {
define(function () {
'use strict';

var mobileDetectRules = {
Expand Down Expand Up @@ -797,12 +798,9 @@
}
};

exports(MobileDetect);

})(function (data, undefined) {

// environment-dependent
if (typeof window !== 'undefined' && window.screen && window.screen.width) {
data.isPhoneSized = function (maxPhoneWidth) {
MobileDetect.isPhoneSized = function (maxPhoneWidth) {
if (maxPhoneWidth < 0) {
return undefined;
}
Expand All @@ -813,22 +811,20 @@
return cssPixelWidth <= maxPhoneWidth;
};
} else {
data.isPhoneSized = function () {};
MobileDetect.isPhoneSized = function () {};
}

if (typeof module !== 'undefined' && module.exports) {

module.exports = data;

} else if (typeof define === 'function' && define.amd) {

define(function () { return data; });

return MobileDetect;
}); // end of call of define()
})((function (undefined) {
if (typeof define === 'function' && define.amd) {
return define;
} else if (typeof module !== 'undefined' && module.exports) {
return function (factory) { module.exports = factory(); };
} else if (typeof window !== 'undefined') {

window.MobileDetect = data;

return function (factory) { window.MobileDetect = factory(); };
} else {
throw new Error('unknown environment'); // please file a bug if you get this error!
// please file a bug if you get this error!
throw new Error('unknown environment');
}
});
})());
4 changes: 2 additions & 2 deletions mobile-detect.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobile-detect",
"version": "0.4.0",
"version": "0.4.1-SNAPSHOT",
"description": "Device detection (phone, tablet, desktop, mobile grade, os, versions)",
"main": "mobile-detect.js",
"scripts": {
Expand Down

0 comments on commit 338c15d

Please sign in to comment.