Following coding guideline JS8: "Follow guidelines set by ESLint," some errors should be corrected in these OPAC scripts: amazonimages.js bakertaylorimages.js google-jackets.js localcovers.js openlibrary.js
Created attachment 164608 [details] [review] Bug 36566: Correct eslint errors in OPAC enhanced content JS This patch fixes various eslint errors in enhanced content JS files: - Consistent indentation - Remove variables which are declared but not used - Add missing semicolons - Add missing "var" declarations To test, apply the patch and clear your browser cache if necessary. - Go to Administration -> System preferences and enable these preferences: - OPACAmazonCoverImages - BakerTaylorEnabled - GoogleJackets - OPACLocalCoverImages - OpenLibraryCovers - Go to the OPAC and confirm that covers from these services appear correctly in search results and on detail pages.
Created attachment 165694 [details] [review] Bug 36566: Correct eslint errors in OPAC enhanced content JS This patch fixes various eslint errors in enhanced content JS files: - Consistent indentation - Remove variables which are declared but not used - Add missing semicolons - Add missing "var" declarations To test, apply the patch and clear your browser cache if necessary. - Go to Administration -> System preferences and enable these preferences: - OPACAmazonCoverImages - BakerTaylorEnabled - GoogleJackets - OPACLocalCoverImages - OpenLibraryCovers - Go to the OPAC and confirm that covers from these services appear correctly in search results and on detail pages. Signed-off-by: David Nind <david@davidnind.com>
Testing notes (using KTD): 1. No changes noted after patch applied - continued to work as expected. 2. No console errors using web development tools (apart from 404 for Baker & Taylor images, as I have no credentials). 3. I have no Baker & Taylor credentials - placeholder/broken image displayed, so I'll assume it will display any available image if you do have credentials. 4. OPAC search results: with multiple cover image services enabled, the images display side-by-side to the right. I'm assuming that is how it should work (?). No difference in behavour before and after patch.