Best JS workaround