mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-12-26 01:18:51 -05:00
Improved internal Modernizr testing function
This commit is contained in:
parent
90029198a4
commit
ce9b3cab18
@ -54,12 +54,23 @@ var octopress = (function(){
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
, testFeatures: function () {
|
, testFeature: function (features) {
|
||||||
if (Modernizr.testAllProps('maskImage')) {
|
getTestClasses = function (tests) {
|
||||||
$('html').addClass('maskimage')
|
classes = '';
|
||||||
|
if (typeof(tests.join) == 'function') {
|
||||||
|
for (var i=0; i < features.length; i++)
|
||||||
|
classes += getClass(features[i]) + ' ';
|
||||||
} else {
|
} else {
|
||||||
$('html').addClass('no-maskimage')
|
classes = getClass(tests);
|
||||||
}
|
}
|
||||||
|
return classes;
|
||||||
|
}
|
||||||
|
|
||||||
|
getClass = function (test) {
|
||||||
|
return ((Modernizr.testAllProps(test) ? test : "no-"+features[i]).toLowerCase())
|
||||||
|
}
|
||||||
|
|
||||||
|
$('html').addClass(getTestClasses(features));
|
||||||
}
|
}
|
||||||
|
|
||||||
, flashVideoFallback: function (){
|
, flashVideoFallback: function (){
|
||||||
@ -244,7 +255,7 @@ var octopress = (function(){
|
|||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
octopress.wrapFlashVideos();
|
octopress.wrapFlashVideos();
|
||||||
octopress.testFeatures();
|
octopress.testFeature(['maskImage', 'transform']);
|
||||||
octopress.flashVideoFallback();
|
octopress.flashVideoFallback();
|
||||||
octopress.addCodeLineNumbers();
|
octopress.addCodeLineNumbers();
|
||||||
octopress.addMobileNav();
|
octopress.addMobileNav();
|
||||||
|
Loading…
Reference in New Issue
Block a user