Moving out all JS from background.html

Signed-off-by: Braiam Peguero <braiamp@gmail.com>