For the time being I can&#x27;t access original implementation, but quick and dirty version looks like this: <a href="https:&#x2F;&#x2F;gist.github.com&#x2F;hadrianw&#x2F;8e6f9c1007953b37f768" rel="nofollow">https:&#x2F;&#x2F;gist.github.com&#x2F;hadrianw&#x2F;8e6f9c1007953b37f768</a>