From f6594a3b0f17464d1bfc01ef5dc198f5f8020d5b Mon Sep 17 00:00:00 2001 From: Lisa Schumann <44737067+lisaschumann@users.noreply.github.com> Date: Wed, 4 Oct 2023 14:42:19 +0200 Subject: [PATCH] Update shareon.js to include LinkedIn image refresh LinkedIn url has to include "&latest" so the latest url preview is being used not the cached one. --- src/shareon.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/shareon.js b/src/shareon.js index d5ce29f..4fe4922 100644 --- a/src/shareon.js +++ b/src/shareon.js @@ -18,7 +18,7 @@ import "./shareon.css"; */ const urlBuilderMap = { facebook: (d) => `https://www.facebook.com/sharer/sharer.php?u=${d.url}${d.hashtags? `&hashtag=%23${d.hashtags.split('%2C')[0]}` : ''}`, - linkedin: (d) => `https://www.linkedin.com/sharing/share-offsite/?url=${d.url}`, + linkedin: (d) => `https://www.linkedin.com/sharing/share-offsite/?url=${d.url}&latest`, mastodon: (d) => `https://toot.kytta.dev/?text=${d.title}%0D%0A${d.url}${d.text ? `%0D%0A%0D%0A${d.text}` : ''}${d.via ? `%0D%0A%0D%0A${d.via}` : ''}`, messenger: (d) => `https://www.facebook.com/dialog/send?app_id=${d.fbAppId}&link=${d.url}&redirect_uri=${d.url}`, odnoklassniki: (d) => `https://connect.ok.ru/offer?url=${d.url}&title=${d.title}${d.media ? `&imageUrl=${d.media}` : ''}`,