Added some codes to plugin js file