Create a plugin that dequeues the javascript you don’t want, and enqueues the edited javascript.
<?php
/**
* Plugin Name: Stackexchange Sample
* Author: Nathan Johnson
* Licence: GPL2+
* Licence URI: https://www.gnu.org/licenses/gpl-2.0.en.html
* Domain Path: /languages
* Text Domain: stackexchange-sample
*/
//* Don't access this file directly
defined( 'ABSPATH' ) or die();
add_action( 'wp_enqueue_scripts', 'wpse_106269_enqueue_scripts', 15 );
function wpse_106269_enqueue_scripts() {
$slb = SimpleLightbox::get_instance();
wp_dequeue_script( 'simplelightbox-call');
wp_deregister_script( 'simplelightbox-call' );
wp_register_script( 'simplelightbox-edit',
plugins_url( '/simplelightbox-edit.js', __FILE__ ),
[ 'jquery', 'simplelightbox' ], false, true);
wp_localize_script( 'simplelightbox-edit', 'php_vars', $slb->options );
wp_enqueue_script( 'simplelightbox-edit' );
}
EDIT: I just tested the above plugin on a fresh install and it dequeues the ‘simplelightbox-call’ javascript and enqueues the edited script.