hugo-easy-gallery icon indicating copy to clipboard operation
hugo-easy-gallery copied to clipboard

POC of removing jquery

Open Artiavis opened this issue 6 years ago • 1 comments

Hey, thanks for creating this plugin! It's proven really helpful (still massaging my installation but getting very close)!

I noticed you're using jQuery, and figured I'd send you a POC where it can be removed (although I may have missed 1-2 things, not promising this is perfect). Photoswipe already assumes IE8+; it's only a short jump to not having it. Could be worth considering for those who don't want/need jQuery and don't currently have it.

Artiavis avatar Apr 23 '18 02:04 Artiavis

Hi @Artiavis,

Thanks for your contribution.

I do understand your point about jQuery not really being necessary, but I haven't coded anything for 2 years, and I don't understand my own code anymore, so I have to take the approach of "if it isn't broken, don't fix it".

You make a good point though :-)

Instead of changing static/js/load-photoswipe.js, could you create a new file called static/js/load-photoswipe-nojquery.js and put comments in the other relevant files to explain how to use the nojquery version if you want to?

Regards, Li-Wen

liwenyip avatar Apr 22 '19 03:04 liwenyip