Built motion from commit 7767ffc.|0.0.132
[motion.git] / public / bower_components / angular-clipboard / angular-clipboard.js
index 3b45881..cd2694d 100644 (file)
@@ -46,7 +46,8 @@ return angular.module('angular-clipboard', [])
         }
 
         return {
-            copyText: copyText
+            copyText: copyText,
+            supported: 'queryCommandSupported' in document && document.queryCommandSupported('copy')
         };
     }])
     .directive('clipboard', ['clipboard', function (clipboard) {
@@ -55,9 +56,12 @@ return angular.module('angular-clipboard', [])
             scope: {
                 onCopied: '&',
                 onError: '&',
-                text: '='
+                text: '=',
+                supported: '=?'
             },
             link: function (scope, element) {
+                scope.supported = clipboard.supported;
+
                 element.on('click', function (event) {
                     try {
                         clipboard.copyText(scope.text);
@@ -74,4 +78,4 @@ return angular.module('angular-clipboard', [])
         };
     }]);
 
-}));
\ No newline at end of file
+}));