How to use the modernizr.addTest function in modernizr

To help you get started, we’ve selected a few modernizr examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github tvly / tvly-web / src / main.js View on Github external
// Flowplayer
import 'flowplayer/dist/skin/skin.css';

import './animation.css';

// Google Analytics
import analytics from 'universal-ga';
if (config.googleAnalytics) {
  analytics.initialize(config.googleAnalytics);
}

// offline-plugin
import * as OfflinePlugin from 'offline-plugin/runtime';
OfflinePlugin.install();

Modernizr.addTest(detects);

new Vue({
  el: '#app',
  components: {
    'auth-notification': AuthorizationNotification,
  },
  data: {
    channels: {
      Categories: [],
    },
    transition: '',
  },
  watch: {
    '$route'(to, from) {
      if (from.name === 'play') { // left play view
        this.transition = 'slide-right';
github gilbarbara / react-redux-saga-boilerplate / src / vendor / modernizr-custom.js View on Github external
{ string: navigator.userAgent, subString: 'Opera', identity: 'Opera' },
    { string: navigator.userAgent, subString: 'OPR', identity: 'Opera' },
    { string: navigator.userAgent, subString: 'Chrome', identity: 'Chrome' },
    { string: navigator.userAgent, subString: 'Safari', identity: 'Safari' },
  ],
};

BrowserDetect.init();

Modernizr.addTest('ipad', Boolean(navigator.userAgent.match(/iPad/i)));

Modernizr.addTest('iphone', Boolean(navigator.userAgent.match(/iPhone/i)));

Modernizr.addTest('ipod', Boolean(navigator.userAgent.match(/iPod/i)));

Modernizr.addTest('ios', Modernizr.ipad || Modernizr.ipod || Modernizr.iphone);

Modernizr.addTest('ie', Boolean(BrowserDetect.browser === 'Explorer'));

require('expose?MobileDetect!mobile-detect');
require('mobile-detect/mobile-detect-modernizr');
github gilbarbara / react-redux-saga-boilerplate / src / vendor / modernizr-custom.js View on Github external
{ string: navigator.userAgent, subString: 'Trident', identity: 'Explorer' },
    { string: navigator.userAgent, subString: 'Firefox', identity: 'Firefox' },
    { string: navigator.userAgent, subString: 'Opera', identity: 'Opera' },
    { string: navigator.userAgent, subString: 'OPR', identity: 'Opera' },
    { string: navigator.userAgent, subString: 'Chrome', identity: 'Chrome' },
    { string: navigator.userAgent, subString: 'Safari', identity: 'Safari' },
  ],
};

BrowserDetect.init();

Modernizr.addTest('ipad', Boolean(navigator.userAgent.match(/iPad/i)));

Modernizr.addTest('iphone', Boolean(navigator.userAgent.match(/iPhone/i)));

Modernizr.addTest('ipod', Boolean(navigator.userAgent.match(/iPod/i)));

Modernizr.addTest('ios', Modernizr.ipad || Modernizr.ipod || Modernizr.iphone);

Modernizr.addTest('ie', Boolean(BrowserDetect.browser === 'Explorer'));

require('expose?MobileDetect!mobile-detect');
require('mobile-detect/mobile-detect-modernizr');
github gilbarbara / react-redux-saga-boilerplate / src / vendor / modernizr-custom.js View on Github external
{ string: navigator.userAgent, subString: 'Edge', identity: 'MS Edge' },
    { string: navigator.userAgent, subString: 'MSIE', identity: 'Explorer' },
    { string: navigator.userAgent, subString: 'Trident', identity: 'Explorer' },
    { string: navigator.userAgent, subString: 'Firefox', identity: 'Firefox' },
    { string: navigator.userAgent, subString: 'Opera', identity: 'Opera' },
    { string: navigator.userAgent, subString: 'OPR', identity: 'Opera' },
    { string: navigator.userAgent, subString: 'Chrome', identity: 'Chrome' },
    { string: navigator.userAgent, subString: 'Safari', identity: 'Safari' },
  ],
};

BrowserDetect.init();

Modernizr.addTest('ipad', Boolean(navigator.userAgent.match(/iPad/i)));

Modernizr.addTest('iphone', Boolean(navigator.userAgent.match(/iPhone/i)));

Modernizr.addTest('ipod', Boolean(navigator.userAgent.match(/iPod/i)));

Modernizr.addTest('ios', Modernizr.ipad || Modernizr.ipod || Modernizr.iphone);

Modernizr.addTest('ie', Boolean(BrowserDetect.browser === 'Explorer'));

require('expose?MobileDetect!mobile-detect');
require('mobile-detect/mobile-detect-modernizr');
github gilbarbara / react-redux-saga-boilerplate / src / vendor / modernizr-custom.js View on Github external
dataBrowser: [
    { string: navigator.userAgent, subString: 'Edge', identity: 'MS Edge' },
    { string: navigator.userAgent, subString: 'MSIE', identity: 'Explorer' },
    { string: navigator.userAgent, subString: 'Trident', identity: 'Explorer' },
    { string: navigator.userAgent, subString: 'Firefox', identity: 'Firefox' },
    { string: navigator.userAgent, subString: 'Opera', identity: 'Opera' },
    { string: navigator.userAgent, subString: 'OPR', identity: 'Opera' },
    { string: navigator.userAgent, subString: 'Chrome', identity: 'Chrome' },
    { string: navigator.userAgent, subString: 'Safari', identity: 'Safari' },
  ],
};

BrowserDetect.init();

Modernizr.addTest('ipad', Boolean(navigator.userAgent.match(/iPad/i)));

Modernizr.addTest('iphone', Boolean(navigator.userAgent.match(/iPhone/i)));

Modernizr.addTest('ipod', Boolean(navigator.userAgent.match(/iPod/i)));

Modernizr.addTest('ios', Modernizr.ipad || Modernizr.ipod || Modernizr.iphone);

Modernizr.addTest('ie', Boolean(BrowserDetect.browser === 'Explorer'));

require('expose?MobileDetect!mobile-detect');
require('mobile-detect/mobile-detect-modernizr');
github gilbarbara / react-redux-saga-boilerplate / src / vendor / modernizr-custom.js View on Github external
{ string: navigator.userAgent, subString: 'Chrome', identity: 'Chrome' },
    { string: navigator.userAgent, subString: 'Safari', identity: 'Safari' },
  ],
};

BrowserDetect.init();

Modernizr.addTest('ipad', Boolean(navigator.userAgent.match(/iPad/i)));

Modernizr.addTest('iphone', Boolean(navigator.userAgent.match(/iPhone/i)));

Modernizr.addTest('ipod', Boolean(navigator.userAgent.match(/iPod/i)));

Modernizr.addTest('ios', Modernizr.ipad || Modernizr.ipod || Modernizr.iphone);

Modernizr.addTest('ie', Boolean(BrowserDetect.browser === 'Explorer'));

require('expose?MobileDetect!mobile-detect');
require('mobile-detect/mobile-detect-modernizr');
github jplusplus / the-accountant / src / modernizr.js View on Github external
const test = `${Modernizr._domPrefixes[i]}ClipPath`;
          if (style[test] && style[test] !== "none") {
            clip = true;
            break;
          }
        }
      }

      return Modernizr.testProp('clipPath') && clip;
    });
  }

  for (; t < tests.length; t++) {
    name = tests[t].name;
    value = tests[t].value;
    Modernizr.addTest(`cssclippath${name}`, addTest);
  }
}