1

I want to add two onclick events to one social share button. one event to open a new window for that social platform with getting details for the same page like (post title, post description, and post image) and the second one is to hide the URL preview at bottom of the browser. Please see my code and help me how can I do that?

<button class="social-share-button">
<a href="http://pinterest.com/pin/create/button/?url=&description=" onclick="window.open('http://pinterest.com/pin/create/button/?url=' + encodeURIComponent(document.URL) + '&description=' + encodeURIComponent(document.title)); 
return false;">Pin on Pinterest</a>
</button>
Nick
  • 45
  • 5
  • "the second one is to hide the URL preview at bottom of the browser" — Don't try to hide information the browser gives to users. It's hostile behaviour. – Quentin Apr 25 '22 at 18:08

0 Answers0