summaryrefslogtreecommitdiffstats
path: root/webapp/utils/utils.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r--webapp/utils/utils.jsx8
1 files changed, 8 insertions, 0 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index 65a203ab0..ee2c4099f 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -32,6 +32,14 @@ export function cleanUpUrlable(input) {
return cleaned;
}
+export function isMac() {
+ return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
+}
+
+export function cmdOrCtrlPressed(e) {
+ return (isMac() && e.metaKey) || (!isMac() && e.ctrlKey);
+}
+
export function isChrome() {
if (navigator.userAgent.indexOf('Chrome') > -1) {
return true;