[OE-4623] Migrated "expert" mode handling from PHP into JavaScript so it can be changed on the fly.