examples: Simplify ref and refs example JS, reducing requests