wrap script in a closure to prevent global qq leak, conditionally export as AMD module if requested, otherwise bind to root as before (except now explicit), +footer.js