[bug981357] - Moved inline friendlycode script into separate js file

In order to get closer to CSP implementation I'm moving inline scripts into separate files. Parsed all env variables from html to js file, tested, everything works fine.