add some javascript to the main layout