- Define g and s as parameter even though they're only given a value inside the function
- Pass document into the function instead of using it from global scope
- Insert a script tag in front of the other script tags on-the-fly using insertBefore, instead of simply doing <script async src="...">...</script>
Pretty interesting. Care to explain a bit?