refactor browser related scripts, add safari, opera, yandex support