How to use the @cycjimmy/awesome-js-funcs/handheld.getBrowserInfo function in @cycjimmy/awesome-js-funcs

To help you get started, we’ve selected a few @cycjimmy/awesome-js-funcs 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 cycjimmy / h5-webpack-starter / app / load.js View on Github external
// services
import preventDefault from '@cycjimmy/awesome-js-funcs/event/preventDefault';

// polyfill
import './polyfill';

// offline runtime
if (!DEVELOPMENT) {
  const OfflinePluginRuntime = require('offline-plugin/runtime');
  OfflinePluginRuntime.install();
}

if (DEVELOPMENT) {
  console.log('Development Mode');
  console.log(require('@cycjimmy/awesome-js-funcs/handheld').getBrowserInfo());
}

if (PRODUCTION) {
  console.log('Production Mode');
}

// contextMenu preventDefault
document.addEventListener('contextmenu', preventDefault);

// fix ios native scrolling
document.body.addEventListener('touchmove', preventDefault, {passive: false});

// component
import LoadingComponent from './loadingComponent/Loading.component';
import PromptMobileComponentIns from './share/promptMobile/PromptMobile.component.ins';