JavaScript snips