# Twitter shared URL has a query string

**URL:** https://meta.discourse.org/t/twitter-shared-url-has-a-query-string/47446
**Category:** Support
**Created:** [July 18, 2016, 6:10am UTC](https://meta.discourse.org/t/twitter-shared-url-has-a-query-string/47446 "2016-07-18T06:10:38Z")
**Posts on this page:** 1
**Showing post:** 12

<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: [July 20, 2016, 6:47am UTC](https://meta.discourse.org/t/twitter-shared-url-has-a-query-string/47446/12 "2016-07-20T06:47:00Z")

</div>

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/twitter-shared-url-has-a-query-string/47446)._
