Minimal JavaScript router