Bug 1017257 - Make loop code CSP-friendly (remove all inline script) r=Standard8