Title: Sharing Script issue
Last modified: August 21, 2016

---

# Sharing Script issue

 *  Resolved [Hemant Nandrajog (instruite)](https://wordpress.org/support/users/instruite/)
 * (@instruite)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/sharing-script-issue/)
 * Hello,
 * Enabling Disable CSS and JS under sharing options remove the css and js files
   
   but it still adds script (for each enabled service) in the footer.
 * Now since I am using separate minify and defering logics for javascript files
   those scripts get added before actual jquery script is loaded.
 * And also I will like to be able to control that I put those scripts in js file
   rather than directly on page html
 * I tried remove_action but that does not work, I guess since those are directly
   written on page when sharing_add_footer function is called, remove_action can
   not unwrite those
 * Having ability to control those scripts will be appreciated.
 * Thanks
    Hemant
 * [http://wordpress.org/extend/plugins/jetpack/](http://wordpress.org/extend/plugins/jetpack/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [12 years, 11 months ago](https://wordpress.org/support/topic/sharing-script-issue/#post-3865623)
 * Since the `sharing_add_footer` is hooked inside the `sharing_display` function,
   that is itself hooked into `the_content`, you need to `remove_action` later. 
   This worked for me:
 *     ```
       function jetpackme_rm_share_scripts() {
       	remove_action( 'wp_footer', 'sharing_add_footer' );
       }
       add_action( 'loop_end', 'jetpackme_rm_share_scripts' );
       ```
   
 *  Thread Starter [Hemant Nandrajog (instruite)](https://wordpress.org/support/users/instruite/)
 * (@instruite)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/sharing-script-issue/#post-3865634)
 * Thanks Jeremy,
 * That worked and removed the script part but it also removed the hidden email 
   form for email button.
 * Now have to figure out how to add that email part.
 * Thanks
    Hemant
 *  Plugin Author [Jeremy Herve](https://wordpress.org/support/users/jeherve/)
 * (@jeherve)
 * Jetpack Mechanic 🚀
 * [12 years, 11 months ago](https://wordpress.org/support/topic/sharing-script-issue/#post-3865651)
 * You can find the email sharing form in modules/sharedaddy/sharing-sources.php:
   
   [http://plugins.trac.wordpress.org/browser/jetpack/trunk/modules/sharedaddy/sharing-sources.php#L272](http://plugins.trac.wordpress.org/browser/jetpack/trunk/modules/sharedaddy/sharing-sources.php#L272)
 *  Thread Starter [Hemant Nandrajog (instruite)](https://wordpress.org/support/users/instruite/)
 * (@instruite)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/sharing-script-issue/#post-3865688)
 * Thanks for the information, Jeremy.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Sharing Script issue’ is closed to new replies.

 * ![](https://ps.w.org/jetpack/assets/icon.svg?rev=2819237)
 * [Jetpack - WP Security, Backup, Speed, & Growth](https://wordpress.org/plugins/jetpack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jetpack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jetpack/)
 * [Active Topics](https://wordpress.org/support/plugin/jetpack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jetpack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jetpack/reviews/)

## Tags

 * [sharing](https://wordpress.org/support/topic-tag/sharing/)

 * 4 replies
 * 2 participants
 * Last reply from: [Hemant Nandrajog (instruite)](https://wordpress.org/support/users/instruite/)
 * Last activity: [12 years, 11 months ago](https://wordpress.org/support/topic/sharing-script-issue/#post-3865688)
 * Status: resolved