add widget example with js preferences