Files
railwaysystem/RuoYi-Vue/ruoyi-ui/node_modules1/@antv/g6-pc/lib/util/browser.js
T
2026-09-10 15:40:10 +08:00

20 lines
657 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getBrowserName = void 0;
/**
* Get current browser name.
* @returns browser name
*/
var getBrowserName = exports.getBrowserName = function getBrowserName() {
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('firefox') > -1) return 'firefox';
if (userAgent.indexOf('safari') > -1) return 'safari';
if (userAgent.indexOf('opr') > -1) return 'opera';
if (userAgent.indexOf('chrome') > -1) return 'chrome';
if (userAgent.indexOf('trident') > -1) return 'ie 11';
if (userAgent.indexOf('ie') > -1) return 'ie';
return 'unknown';
};