Title: replace a JS with a modified script
Last modified: August 19, 2016

---

# replace a JS with a modified script

 *  Resolved [skarck](https://wordpress.org/support/users/skarck/)
 * (@skarck)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/replace-a-js-with-a-modified-script/)
 * Hi!
 * I’m trying to modify the behavior of the image edit tool and need to do a few
   changes to a JS in admin/js/ …
    is there a way to tell a plugin to dequeue a 
   core-script and call a custom script instead???
 * i don’t want to mess with the files again after every update…
 * thx in advance!

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

 *  [Mark / t31os](https://wordpress.org/support/users/t31os_/)
 * (@t31os_)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/replace-a-js-with-a-modified-script/#post-1720703)
 * `wp_deregister_script` – sorry couldn’t find a codex page for it
 * [http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/functions.wp-scripts.php#L80](http://core.trac.wordpress.org/browser/tags/3.0.1/wp-includes/functions.wp-scripts.php#L80)
 * Unregister the existing one, then register your own with the same name (that 
   way you won’t cause any enqueued scripts that have dependancies on that file 
   to fail).
 *  Thread Starter [skarck](https://wordpress.org/support/users/skarck/)
 * (@skarck)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/replace-a-js-with-a-modified-script/#post-1720716)
 * this is perfect, thanks!

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

The topic ‘replace a JS with a modified script’ is closed to new replies.

## Tags

 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [js](https://wordpress.org/support/topic-tag/js/)
 * [Modify](https://wordpress.org/support/topic-tag/modify/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 2 replies
 * 2 participants
 * Last reply from: [skarck](https://wordpress.org/support/users/skarck/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/replace-a-js-with-a-modified-script/#post-1720716)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
