Changed the use of hardcoded plugin dir in the js. Using plugin_dir_url instead.