This feature already exists and has existed for like 10 years (I know because I built the original implementation of it)