removed deprecated write javascript method

To support Cordova version 4