extract command functionality in content scripts