Skip to content

Commit

Permalink
Removing Modernizr global from test return values.
Browse files Browse the repository at this point in the history
  • Loading branch information
rupl committed Sep 21, 2012
1 parent 7d2a489 commit d9b6473
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion feature-detects/canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@

Modernizr.addTest('canvas', function() {
var elem = document.createElement('canvas');
Modernizr.canvas = !!(elem.getContext && elem.getContext('2d'));
return !!(elem.getContext && elem.getContext('2d'));
});
2 changes: 1 addition & 1 deletion feature-detects/canvastext.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
// Canvas text

Modernizr.addTest('canvastext',
(Modernizr.canvastext = !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function')))
!!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function'))
);
2 changes: 1 addition & 1 deletion feature-detects/geolocation.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
// Meanwhile, in Firefox < 8, an about:config setting could expose
// a false positive that would throw an exception: bugzil.la/688158

Modernizr.addTest('geolocation', Modernizr.geolocation = 'geolocation' in navigator);
Modernizr.addTest('geolocation', 'geolocation' in navigator);
2 changes: 1 addition & 1 deletion feature-detects/postmessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// postMessage
// http://www.w3.org/TR/html5/comms.html#posting-messages

Modernizr.addTest('postmessage', Modernizr.postmessage = !!window.postMessage);
Modernizr.addTest('postmessage', !!window.postMessage);
2 changes: 1 addition & 1 deletion feature-detects/touch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Modernizr.addTest('touch', function() {
});
}

Modernizr.touch = bool;
return bool;
});
2 changes: 1 addition & 1 deletion feature-detects/webgl.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
// We do a soft detect which may false positive in order to avoid
// an expensive context creation: bugzil.la/732441

Modernizr.addTests('webgl', (Modernizr.webgl = !!window.WebGLRenderingContext));
Modernizr.addTests('webgl', !!window.WebGLRenderingContext);
2 changes: 1 addition & 1 deletion feature-detects/websqldatabase.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
// Chrome incognito mode used to throw an exception when using openDatabase
// It doesn't anymore.

Modernizr.addTest('websqldatabase', Modernizr.websqldatabase = !!window.openDatabase);
Modernizr.addTest('websqldatabase', !!window.openDatabase);

0 comments on commit d9b6473

Please sign in to comment.