Need to disable <img> to be selected from clicks using JS

Hi guys,

I have a quick question. I am doing a refresh on a Diablo 2 (the game) skill planner as a side project of mine to help me furhter my JS skills (currently on Web Dev path). It is a beautiful piece of Javascript magic done by someone else. I want to improve it a bit. I need help with 2 things that are currently not working.

#1 - if you start clicking on skills to increase their skill level, the whole image becomes selected in blue and it ruins the fun. The whole deal is that the author has achieved the clickling on the image by using and magic. So basically you are clicking on an . How can I prevent this from happening? Maybe disable double-clicks on the itself?

See it for yourself - https://mmo.gamerz-bg.com/calc2/amazon.html - try clicking on the skill tiles.

#2 - So once you put your skill points into the skills, there is a “Link to build” button at the bottom. It is supposed to record your current choices and update the current URL query string with the recorded choices. However, it is not working. And this is a very needed feature. The code that handles this is here - function updatelink() in the https://mmo.gamerz-bg.com/calc2/Trees.js file.

I would really appreciate your help. Thanks in advance