current-device-v2
Advanced tools
Comparing version 0.10.3 to 0.10.4
@@ -32,3 +32,3 @@ // Save the previous value of the device variable. | ||
ctx.closePath(); | ||
txt = 'abz190#$%^@£éú'; | ||
var txt = 'abz190#$%^@£éú'; | ||
ctx.textBaseline = "top"; | ||
@@ -35,0 +35,0 @@ ctx.font = '17px "Arial 17"'; |
@@ -36,3 +36,3 @@ "use strict"; | ||
ctx.closePath(); | ||
txt = 'abz190#$%^@£éú'; | ||
var txt = 'abz190#$%^@£éú'; | ||
ctx.textBaseline = "top"; | ||
@@ -39,0 +39,0 @@ ctx.font = '17px "Arial 17"'; |
{ | ||
"name": "current-device-v2", | ||
"version": "0.10.3", | ||
"version": "0.10.4", | ||
"homepage": "https://github.com/matvejs16/current-device-v2", | ||
@@ -5,0 +5,0 @@ "description": "The easiest way to write conditional CSS and/or JavaScript based on device operating system (iOS, Android, Blackberry, Windows, Firefox OS, MeeGo, AppleTV, etc), orientation (Portrait vs. Landscape), and type (Tablet vs. Mobile).", |
/*! | ||
* current-device-v2 v0.10.3 - https://github.com/matvejs16/current-device-v2 | ||
* current-device-v2 v0.10.4 - https://github.com/matvejs16/current-device-v2 | ||
* MIT Licensed | ||
@@ -145,3 +145,3 @@ */ | ||
ctx.closePath(); | ||
txt = 'abz190#$%^@£éú'; | ||
var txt = 'abz190#$%^@£éú'; | ||
ctx.textBaseline = "top"; | ||
@@ -148,0 +148,0 @@ ctx.font = '17px "Arial 17"'; |
/*! | ||
* current-device-v2 v0.10.3 - https://github.com/matvejs16/current-device-v2 | ||
* current-device-v2 v0.10.4 - https://github.com/matvejs16/current-device-v2 | ||
* MIT Licensed | ||
*/ | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.device=n():e.device=n()}(window,(function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(n){return e[n]}.bind(null,r));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){e.exports=t(1)},function(e,n,t){"use strict";t.r(n);var o=window.device,r={},a=[];window.device=r;var c=window.document.documentElement,l=window.navigator.userAgent.toLowerCase(),d=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","pov_tv","hbbtv","ce-html"],s=document.createElement("canvas"),u=s.getContext("2d");for(u.fillStyle="rgb(255,0,255)",u.beginPath(),u.rect(20,20,150,100),u.fill(),u.stroke(),u.closePath(),u.beginPath(),u.fillStyle="rgb(0,255,255)",u.arc(50,50,50,0,2*Math.PI,!0),u.fill(),u.stroke(),u.closePath(),txt="abz190#$%^@£éú",u.textBaseline="top",u.font='17px "Arial 17"',u.textBaseline="alphabetic",u.fillStyle="rgb(255,5,5)",u.rotate(.03),u.fillText(txt,4,17),u.fillStyle="rgb(155,255,5)",u.shadowBlur=8,u.shadowColor="red",u.fillRect(20,12,100,5),src=s.toDataURL(),hash=0,i=0;i<src.length;i++)char=src.charCodeAt(i),hash=(hash<<5)-hash+char,hash&=hash;function f(e,n){return-1!==e.indexOf(n)}function p(e){return f(l,e)}function b(e){return c.className.match(new RegExp(e,"i"))}function w(e){var n=null;b(e)||(n=c.className.replace(/^\s+|\s+$/g,""),c.className=n+" "+e)}function h(e){b(e)&&(c.className=c.className.replace(" "+e,""))}function m(){r.landscape()?(h("portrait"),w("landscape"),y("landscape")):(h("landscape"),w("portrait"),y("portrait")),x()}function y(e){for(var n=0;n<a.length;n++)a[n](e)}r.fingerprint={hash:hash,pxDepth:window.screen.pixelDepth,colorDepth:window.screen.colorDepth},r.macos=function(){return p("mac")},r.ios=function(){return r.iphone()||r.ipod()||r.ipad()},r.iphone=function(){return!r.windows()&&p("iphone")},r.ipod=function(){return p("ipod")},r.ipad=function(){var e="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return p("ipad")||e},r.android=function(){return!r.windows()&&p("android")},r.androidPhone=function(){return r.android()&&p("mobile")},r.androidTablet=function(){return r.android()&&!p("mobile")},r.blackberry=function(){return p("blackberry")||p("bb10")},r.blackberryPhone=function(){return r.blackberry()&&!p("tablet")},r.blackberryTablet=function(){return r.blackberry()&&p("tablet")},r.windows=function(){return p("windows")},r.windowsPhone=function(){return r.windows()&&p("phone")},r.windowsTablet=function(){return r.windows()&&p("touch")&&!r.windowsPhone()},r.fxos=function(){return(p("(mobile")||p("(tablet"))&&p(" rv:")},r.fxosPhone=function(){return r.fxos()&&p("mobile")},r.fxosTablet=function(){return r.fxos()&&p("tablet")},r.meego=function(){return p("meego")},r.cordova=function(){return window.cordova&&"file:"===location.protocol},r.nodeWebkit=function(){return"object"==typeof window.process},r.mobile=function(){return r.androidPhone()||r.iphone()||r.ipod()||r.windowsPhone()||r.blackberryPhone()||r.fxosPhone()||r.meego()},r.tablet=function(){return r.ipad()||r.androidTablet()||r.blackberryTablet()||r.windowsTablet()||r.fxosTablet()},r.desktop=function(){return!r.tablet()&&!r.mobile()},r.television=function(){for(var e=0;e<d.length;){if(p(d[e]))return!0;e++}return!1},r.portrait=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?f(screen.orientation.type,"portrait"):r.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?90!==Math.abs(window.orientation):window.innerHeight/window.innerWidth>1},r.landscape=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?f(screen.orientation.type,"landscape"):r.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?90===Math.abs(window.orientation):window.innerHeight/window.innerWidth<1},r.noConflict=function(){return window.device=o,this},r.ios()?r.ipad()?w("ios ipad tablet"):r.iphone()?w("ios iphone mobile"):r.ipod()&&w("ios ipod mobile"):r.macos()?w("macos desktop"):r.android()?r.androidTablet()?w("android tablet"):w("android mobile"):r.blackberry()?r.blackberryTablet()?w("blackberry tablet"):w("blackberry mobile"):r.windows()?r.windowsTablet()?w("windows tablet"):r.windowsPhone()?w("windows mobile"):w("windows desktop"):r.fxos()?r.fxosTablet()?w("fxos tablet"):w("fxos mobile"):r.meego()?w("meego mobile"):r.nodeWebkit()?w("node-webkit"):r.television()?w("television"):r.desktop()&&w("desktop"),r.cordova()&&w("cordova"),r.onChangeOrientation=function(e){"function"==typeof e&&a.push(e)};var v="resize";function g(e){for(var n=0;n<e.length;n++)if(r[e[n]]())return e[n];return"unknown"}function x(){r.orientation=g(["portrait","landscape"])}Object.prototype.hasOwnProperty.call(window,"onorientationchange")&&(v="orientationchange"),window.addEventListener?window.addEventListener(v,m,!1):window.attachEvent?window.attachEvent(v,m):window[v]=m,m(),r.type=g(["mobile","tablet","desktop"]),r.os=g(["ios","iphone","ipad","ipod","android","blackberry","macos","windows","fxos","meego","television"]),x(),n.default=r}]).default})); | ||
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.device=n():e.device=n()}(window,(function(){return function(e){var n={};function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var r in e)t.d(o,r,function(n){return e[n]}.bind(null,r));return o},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=0)}([function(e,n,t){e.exports=t(1)},function(e,n,t){"use strict";t.r(n);var o=window.device,r={},a=[];window.device=r;var c=window.document.documentElement,l=window.navigator.userAgent.toLowerCase(),d=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","pov_tv","hbbtv","ce-html"],s=document.createElement("canvas"),u=s.getContext("2d");u.fillStyle="rgb(255,0,255)",u.beginPath(),u.rect(20,20,150,100),u.fill(),u.stroke(),u.closePath(),u.beginPath(),u.fillStyle="rgb(0,255,255)",u.arc(50,50,50,0,2*Math.PI,!0),u.fill(),u.stroke(),u.closePath();for(u.textBaseline="top",u.font='17px "Arial 17"',u.textBaseline="alphabetic",u.fillStyle="rgb(255,5,5)",u.rotate(.03),u.fillText("abz190#$%^@£éú",4,17),u.fillStyle="rgb(155,255,5)",u.shadowBlur=8,u.shadowColor="red",u.fillRect(20,12,100,5),src=s.toDataURL(),hash=0,i=0;i<src.length;i++)char=src.charCodeAt(i),hash=(hash<<5)-hash+char,hash&=hash;function f(e,n){return-1!==e.indexOf(n)}function p(e){return f(l,e)}function b(e){return c.className.match(new RegExp(e,"i"))}function w(e){var n=null;b(e)||(n=c.className.replace(/^\s+|\s+$/g,""),c.className=n+" "+e)}function h(e){b(e)&&(c.className=c.className.replace(" "+e,""))}function m(){r.landscape()?(h("portrait"),w("landscape"),y("landscape")):(h("landscape"),w("portrait"),y("portrait")),x()}function y(e){for(var n=0;n<a.length;n++)a[n](e)}r.fingerprint={hash:hash,pxDepth:window.screen.pixelDepth,colorDepth:window.screen.colorDepth},r.macos=function(){return p("mac")},r.ios=function(){return r.iphone()||r.ipod()||r.ipad()},r.iphone=function(){return!r.windows()&&p("iphone")},r.ipod=function(){return p("ipod")},r.ipad=function(){var e="MacIntel"===navigator.platform&&navigator.maxTouchPoints>1;return p("ipad")||e},r.android=function(){return!r.windows()&&p("android")},r.androidPhone=function(){return r.android()&&p("mobile")},r.androidTablet=function(){return r.android()&&!p("mobile")},r.blackberry=function(){return p("blackberry")||p("bb10")},r.blackberryPhone=function(){return r.blackberry()&&!p("tablet")},r.blackberryTablet=function(){return r.blackberry()&&p("tablet")},r.windows=function(){return p("windows")},r.windowsPhone=function(){return r.windows()&&p("phone")},r.windowsTablet=function(){return r.windows()&&p("touch")&&!r.windowsPhone()},r.fxos=function(){return(p("(mobile")||p("(tablet"))&&p(" rv:")},r.fxosPhone=function(){return r.fxos()&&p("mobile")},r.fxosTablet=function(){return r.fxos()&&p("tablet")},r.meego=function(){return p("meego")},r.cordova=function(){return window.cordova&&"file:"===location.protocol},r.nodeWebkit=function(){return"object"==typeof window.process},r.mobile=function(){return r.androidPhone()||r.iphone()||r.ipod()||r.windowsPhone()||r.blackberryPhone()||r.fxosPhone()||r.meego()},r.tablet=function(){return r.ipad()||r.androidTablet()||r.blackberryTablet()||r.windowsTablet()||r.fxosTablet()},r.desktop=function(){return!r.tablet()&&!r.mobile()},r.television=function(){for(var e=0;e<d.length;){if(p(d[e]))return!0;e++}return!1},r.portrait=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?f(screen.orientation.type,"portrait"):r.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?90!==Math.abs(window.orientation):window.innerHeight/window.innerWidth>1},r.landscape=function(){return screen.orientation&&Object.prototype.hasOwnProperty.call(window,"onorientationchange")?f(screen.orientation.type,"landscape"):r.ios()&&Object.prototype.hasOwnProperty.call(window,"orientation")?90===Math.abs(window.orientation):window.innerHeight/window.innerWidth<1},r.noConflict=function(){return window.device=o,this},r.ios()?r.ipad()?w("ios ipad tablet"):r.iphone()?w("ios iphone mobile"):r.ipod()&&w("ios ipod mobile"):r.macos()?w("macos desktop"):r.android()?r.androidTablet()?w("android tablet"):w("android mobile"):r.blackberry()?r.blackberryTablet()?w("blackberry tablet"):w("blackberry mobile"):r.windows()?r.windowsTablet()?w("windows tablet"):r.windowsPhone()?w("windows mobile"):w("windows desktop"):r.fxos()?r.fxosTablet()?w("fxos tablet"):w("fxos mobile"):r.meego()?w("meego mobile"):r.nodeWebkit()?w("node-webkit"):r.television()?w("television"):r.desktop()&&w("desktop"),r.cordova()&&w("cordova"),r.onChangeOrientation=function(e){"function"==typeof e&&a.push(e)};var v="resize";function g(e){for(var n=0;n<e.length;n++)if(r[e[n]]())return e[n];return"unknown"}function x(){r.orientation=g(["portrait","landscape"])}Object.prototype.hasOwnProperty.call(window,"onorientationchange")&&(v="orientationchange"),window.addEventListener?window.addEventListener(v,m,!1):window.attachEvent?window.attachEvent(v,m):window[v]=m,m(),r.type=g(["mobile","tablet","desktop"]),r.os=g(["ios","iphone","ipad","ipod","android","blackberry","macos","windows","fxos","meego","television"]),x(),n.default=r}]).default})); | ||
//# sourceMappingURL=current-device-v2.min.js.map |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71321