# When sharing a topic

**URL:** https://meta.discourse.org/t/when-sharing-a-topic/108071
**Category:** Support
**Created:** [January 31, 2019, 11:42pm UTC](https://meta.discourse.org/t/when-sharing-a-topic/108071 "2019-01-31T23:42:24Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![vinothkannans](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vinothkannans/32/86465_2.png) [@vinothkannans](https://meta.discourse.org/u/vinothkannans)
#### Post date: [February 1, 2019, 7:20am UTC](https://meta.discourse.org/t/when-sharing-a-topic/108071/6 "2019-02-01T07:20:07Z")

</div>

You can find the code in below topic.

> [@Twitter shared URL has a query string](https://meta.discourse.org/t/twitter-shared-url-has-a-query-string/47446/12):
>
> Okay. If you still prefer to not having it add the below javascript in your discourse customization. It’s working fine for me as you wanted. \<script\> jQuery( document ).ready(function() { $('#main').on('click', '.widget-button.share', function () { var url = $(this).attr('data-share-url'); var i = url.indexOf('?'); if(i \> 0) url = url.substring(0, i); $(this).attr('data-share-url', url); }); }); \</script\>

---

_[View the full topic](https://meta.discourse.org/t/when-sharing-a-topic/108071)._
