[bug973120] - Moved inline script to details.js file, added data-main attribute to the linked script

Closed gh-604.