Create bg.js

source code