MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / browser_display_name

Function browser_display_name

emrun.py:1324–1343  ·  view source on GitHub ↗
(browser)

Source from the content-addressed store, hash-verified

1322
1323
1324def browser_display_name(browser):
1325 b = browser.lower()
1326 if 'iexplore' in b:
1327 return 'Microsoft Internet Explorer'
1328 if 'chrome' in b:
1329 return 'Google Chrome'
1330 if 'firefox' in b:
1331 # Try to identify firefox flavor explicitly, to help show issues where emrun would launch the wrong browser.
1332 try:
1333 product_name = win_get_file_properties(browser)['StringFileInfo']['ProductName'] if WINDOWS else 'firefox'
1334 if product_name.lower() != 'firefox':
1335 return 'Mozilla Firefox ' + product_name
1336 except Exception:
1337 pass
1338 return 'Mozilla Firefox'
1339 if 'opera' in b:
1340 return 'Opera'
1341 if 'safari' in b:
1342 return 'Apple Safari'
1343 return browser
1344
1345
1346def subprocess_env():

Callers 2

get_browser_infoFunction · 0.85
list_pc_browsersFunction · 0.85

Calls 2

win_get_file_propertiesFunction · 0.85
lowerMethod · 0.80

Tested by

no test coverage detected