, , ,

Some time ago, I updated my Firefox extension – Make Bookmark (https://addons.mozilla.org/en-US/firefox/addon/make-bookmark-216811/?src=search). I updated the extension because I wanted to add more functionality. For adding functionality, I added a few JavaScript functions.

When I tested the extension in Firefox, it did not work as per expectations. After trying multiple things like removing comments, renaming some functions and going through the files multiple times, I did not have a clue on the reason for failure.

While scanning the JavaScript code, I decided to move the functions around in the file and group them. While doing so, I noted the reason for failure. The last function that was defined for the object, should NOT be terminated by a comma.

During my update, I had added a few functions after the original ‘last’ function, but forgot to remove the comma. To add to that, I had added a comma to the new ‘last’ function.

On making the changes, the extension started working.