Ported the webworks thumbnail extension to cordova plugin

Please review my code.