Linking to random scenes using Javascript

Another benefit of this script is being able to use it for randomization of ads if they’re brought in via html widget in say up to 10 ads. @Daniel, I’d imagine this would apply to scenes as well? If so, how different would the code look if it was with scenes rather than timelines?