]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6681 @1.5
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 Jan 2024 16:29:41 +0000 (17:29 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 24 Jan 2024 16:29:41 +0000 (17:29 +0100)
resources/linkeditor/js/linkeditor.clipboard.js
resources/linkeditor/js/linkeditor.links.js

index d7ba4e4b277f7e33d4dcf0f5803de72a1414bcc9..5de9600e82af5442c668ad11b5f9833fb351d92a 100644 (file)
@@ -14,9 +14,7 @@ LinkeditorClipboard.prototype = {
             return;
         }
         $(document).on('touchstart click', function () {
-            if (document.hasFocus()) {
-                $this.checkBlocked();
-            }
+            $this.checkBlocked();
             return true;
         });
 
@@ -26,17 +24,16 @@ LinkeditorClipboard.prototype = {
         if (!this.blocked) {
             return;
         }
-        let $this = this;
         this.get(function (c) {
         }, true);
     },
 
     enabled: function () {
-        return !this.blocked && this.support();
+        return this.support();
     },
 
     support: function () {
-        return this.linkeditor.utils.isWindows() && !this.linkeditor.utils.isFirefox();
+        return !this.linkeditor.utils.isFirefox();
     },
 
     empty: function () {
@@ -53,7 +50,7 @@ LinkeditorClipboard.prototype = {
                         .then(blob => {
                             blob.text()
                                 .then(text => {
-                                    if (text.indexOf('<fluidbooklinks>') === 0) {
+                                    if (text.indexOf('<fluidbooklinks>') >= 0) {
                                         $this.content = text;
                                         callback($this.content);
                                     }
index 884c5c7ab390127f9cb3d5635d2e630c5ff32251..40ace7a97d652ac2d04f316ef071f72005c22c3e 100644 (file)
@@ -772,7 +772,6 @@ LinkeditorLinks.prototype = {
     },
 
     selectLink: function (l) {
-        console.log($(l).find('.corners'));
         if ($(l).find('.corners').length === 0) {
             $(l).append('<div class="corners"><div class="nw"></div><div class="n"></div><div class="ne"></div><div class="e"></div><div class="se"></div><div class="s"></div><div class="sw"></div><div class="w"></div></div>')
         }