Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

randomizer.js 1.0KB

1234567891011121314151617181920212223242526272829303132333435
  1. (function (){
  2. //list of tips
  3. var items = [
  4. "You can pin participants by clicking on their thumbnails.",// jshint ignore:line
  5. "You can tell others you have something to say by using the \"Raise Hand\" feature",// jshint ignore:line
  6. "You can learn about key shortcuts by pressing Shift+?",// jshint ignore:line
  7. "You can learn more about the state of everyone's connection by hovering on the bars in their thumbnail",// jshint ignore:line
  8. "You can hide all thumbnails by using the button in the bottom right corner"// jshint ignore:line
  9. ];
  10. /**
  11. * Creates a new Randomiser.
  12. *
  13. * @class
  14. */
  15. function Randomizer(){
  16. this.items = items;
  17. }
  18. /**
  19. * Get a random integer between 0 and items length.
  20. *
  21. * @return {string} a random integer
  22. */
  23. Randomizer.prototype.getItem = function (){
  24. var l = this.items.length - 1;
  25. var n = Math.round(Math.random() * l);
  26. return this.items[n];
  27. };
  28. window.Randomizer = Randomizer;
  29. })();