2015-10-17 23:49:24 +02:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var FeatureDetector = {
|
|
|
|
isMac: function() {
|
|
|
|
return navigator.platform.indexOf('Mac') >= 0;
|
|
|
|
},
|
|
|
|
actionShortcutSymbol: function(formatting) {
|
|
|
|
return this.isMac() ? '⌘' : formatting ? '<span class="thin">ctrl + </span>' : 'ctrl-';
|
|
|
|
},
|
|
|
|
altShortcutSymbol: function(formatting) {
|
|
|
|
return this.isMac() ? '⌥' : formatting ? '<span class="thin">alt + </span>' : 'alt-';
|
2015-10-27 22:57:56 +01:00
|
|
|
},
|
|
|
|
shouldMoveHiddenInputToCopySource: function() {
|
2015-10-29 22:13:15 +01:00
|
|
|
return /(iPad|iPhone)/i.test(navigator.userAgent);
|
|
|
|
},
|
|
|
|
canCopyReadonlyInput: function() {
|
|
|
|
return !(/CriOS/i.test(navigator.userAgent));
|
2015-10-17 23:49:24 +02:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = FeatureDetector;
|