-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into 439_wide_char_class
- Loading branch information
Showing
7 changed files
with
111 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/** | ||
* Attributes and methods to help with identifying the current browser and platform. | ||
* @module xterm/utils/Browser | ||
* @license MIT | ||
*/ | ||
|
||
import { contains } from './Generic'; | ||
|
||
const isNode = (typeof navigator === 'undefined') ? true : false; | ||
const userAgent = (isNode) ? 'node' : navigator.userAgent; | ||
const platform = (isNode) ? 'node' : navigator.platform; | ||
|
||
export const isFirefox = !!~userAgent.indexOf('Firefox'); | ||
export const isMSIE = !!~userAgent.indexOf('MSIE') || !!~userAgent.indexOf('Trident'); | ||
|
||
// Find the users platform. We use this to interpret the meta key | ||
// and ISO third level shifts. | ||
// http://stackoverflow.com/q/19877924/577598 | ||
export const isMac = contains(['Macintosh', 'MacIntel', 'MacPPC', 'Mac68K'], platform); | ||
export const isIpad = platform === 'iPad'; | ||
export const isIphone = platform === 'iPhone'; | ||
export const isMSWindows = contains(['Windows', 'Win16', 'Win32', 'WinCE'], platform); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters