Updated running custom javascript on click (markdown)