Migrate to manifest version 2, also fixed open tab closing popup
page problem