From d4fcb859f0a750806ea6a5d23549be733f2c9293 Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Tue, 21 Jun 2022 19:45:13 -0700 Subject: [PATCH] Remove screenshot preview on link tooltip. --- .../src/components/widget/LinkIconTooltip.js | 30 ++----------------- 1 file changed, 3 insertions(+), 27 deletions(-) diff --git a/packages/mindplot/src/components/widget/LinkIconTooltip.js b/packages/mindplot/src/components/widget/LinkIconTooltip.js index a40b56fc..7e079263 100644 --- a/packages/mindplot/src/components/widget/LinkIconTooltip.js +++ b/packages/mindplot/src/components/widget/LinkIconTooltip.js @@ -41,44 +41,20 @@ class LinkIconTooltip extends FloatingTip { static _buildContent(linkIcon) { const url = linkIcon.getModel().getUrl(); const linkText = `${url}`; - const linkPreview = `https://free.pagepeeker.com/v2/thumbs.php?size=m&url=${url}`; const result = $('
').css({ padding: '5px', width: '100%', }); - - const text = $('
').text(linkText) - .css({ - 'white-space': 'pre-wrap', - 'word-wrap': 'break-word', - }); - result.append(text); - - const imgContainer = $('
') - .css({ - width: '100%', - textAlign: 'right', - 'padding-bottom': '5px', - 'padding-top': '5px', - }); - - const img = $('') - .prop('src', linkPreview) - .prop('img', url) - .prop('alt', url); - - img.css('padding', '5px'); - const link = $('').attr({ href: url, alt: 'Open in new window ...', target: '_blank', }); - link.append(img); - imgContainer.append(link); - result.append(imgContainer); + link.append(linkText); + result.append(link); + return result; } }