Add a legacy detection snippet