modify MyBeacon.js to latest version