Change library view JS to be consistent with changes in PR 5518 / TNL-481