Refactor dogotal pin to pure JS style