Moves public javascript to external file