IMO instead of inline JS we should add the data to the <body> tag as a data attribute and keep this JS external.