1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

2 lines
746 B
JavaScript

!function(){"use strict";angular.module("ngCapsLock",[]).run(["$rootScope","$document","$timeout",function(n,o,e){var i=function(){o.bind("keydown",function(n){20===n.keyCode&&c(!0)}),o.bind("keyup",function(n){20===n.keyCode&&c(!1)}),o.bind("keypress",function(n){var o=n.charCode||n.keyCode,e=n.shiftKey;o>96&&123>o&&c(!1),o>64&&91>o&&!e&&c(!0)})},t=function(){var e=!0;o.bind("keydown",function(o){e||20!==o.keyCode||(e=!0,null!=n.isCapsLockOn&&c(!n.isCapsLockOn))}),o.bind("keyup",function(n){20===n.keyCode&&(e=!1)}),o.bind("keypress",function(n){var o=n.charCode||n.keyCode,e=n.shiftKey;o>96&&123>o&&c(e),o>64&&91>o&&c(!e)})};/Mac|iPad|iPhone|iPod/.test(navigator.platform)?i():t();var c=function(o){e(function(){n.isCapsLockOn=o})}}])}();