Override core Js file
Thanks can be done with with the hook_js_alter function

    function hook_js_alter(&amp;$javascript) {        
    $javascript['js/contextual.js']['data'] = drupal_get_path('theme', 'THEMENAME') . 'js/override/contextual.js';
    }