Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit 9277e0f

Browse files
committed
Handle more browsers
1 parent 9dd4762 commit 9277e0f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

js/options.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,14 @@
193193
getCurrentBrowserName() {
194194
let ua = navigator.userAgent;
195195

196-
if (ua.includes('Firefox') && !ua.includes('Seamonkey')) {
196+
if (ua.includes('Firefox/') && !ua.includes('Seamonkey/')) {
197197
return 'firefox';
198-
} else if (ua.includes('Chrome') && !ua.includes('Chromium')) {
198+
} else if (ua.includes('Chrome/') && !ua.includes('Chromium/')) {
199199
return 'chrome';
200+
} else if (ua.includes('Edg/')) {
201+
return 'edge';
202+
} else if (ua.includes('OPR/')) {
203+
return 'opera';
200204
}
201205

202206
return null;

0 commit comments

Comments
 (0)