Markdown Overhaul (#2624)
Rebuilt Markdown editor/views into new components
This commit is contained in:
parent
945510dcf0
commit
6b54279bb7
50 changed files with 819 additions and 3896 deletions
19
static/js/constants/platform.constant.ts
Normal file
19
static/js/constants/platform.constant.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
/**
|
||||
* Type representing current browser platform.
|
||||
* TODO: Add more browser platforms.
|
||||
*/
|
||||
export type BrowserPlatform = "firefox"
|
||||
| "chrome";
|
||||
|
||||
/**
|
||||
* Constant representing current browser platform. Used for determining available features.
|
||||
* TODO Only rudimentary implementation, should prefer specific feature detection strategies instead.
|
||||
*/
|
||||
export const browserPlatform: BrowserPlatform = (() => {
|
||||
if (navigator.userAgent.toLowerCase().indexOf('firefox') != -1) {
|
||||
return 'firefox';
|
||||
}
|
||||
else {
|
||||
return 'chrome';
|
||||
}
|
||||
})();
|
Reference in a new issue