Assessment wanted for Image gallery with bonus

Hello all,

https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Building_blocks/Image_gallery

My first post here, guys but I am always here reading through topics.
Anyways that image gallery project, while it seems pretty simple in the development world, it boosted up my self-confidence, It was very fun for me to write js codes, what an awesome feeling when it was all done.

Here my project uploaded in github, I played around with codes so I added the AddEventListener keys to browse the images and also to lighten/darken the image, I wanted to show you so I can get a feedback about it if there is like a better way for some code written or more an “elegant” way like MDN technical writer said many times. :slightly_smiling_face:

Github project: https://github.com/tootihamza/powerfull-image-gallery/
Published site: https://tootihamza.github.io/powerfull-image-gallery/

Thanks in advance !

Hello @tootihamza

wow nice work

just little thing

  1. you can merge the 2 listener to the document keydown together
  2. try t find another key to activate the dark and light as alt in linux show the menu bar of the browser and i think it the same for windows but i do not know about mac
    i think use multi key would be better maybe 3 key so you be away from already used shortcut key

hope that help and have a nice day :slight_smile:

1 Like

Thank you very much !
1- yeah you’re right, I was too focused on organising my main.js, so yeah done it merged them into 1 document event listener
2- Changed it to SHIFT instead of ALT

Thanks once again, updated it.

you welcome

but i have one issue not sure if it me or what

when i use your code in chrome based browser it work fine but when i use firefox on my linux it did not i even tried to print the e.code to the console i found it did not even print anything when i press shift or alt or ctrl
not sure if it some crazy configration i did to my firefox or i miss something

if it work fine in your firefox then it my issue then

but you doing great and well done and you welcome
and have a nice day

i found the issue it was in my profile in the browser
i created new one and it work fine

have a nice day :slight_smile: