add beginning of js Palette menu implementation