jiti-meet/randomizer.js

31 lines
1005 B
JavaScript
Raw Normal View History

2016-11-11 15:42:11 +00:00
(function (){
//list of tips
var items = [
"You can pin participants by clicking on their thumbnails.",// jshint ignore:line
"You can tell others you have something to say by using the \"Raise Hand\" feature",// jshint ignore:line
"You can learn about key shortcuts by pressing Shift+?",// jshint ignore:line
"You can learn more about the state of everyone's connection by hovering on the bars in their thumbnail",// jshint ignore:line
"You can hide all thumbnails by using the button in the bottom right corner"// jshint ignore:line
];
/**
2016-11-14 10:31:32 +00:00
* Creates a randomiser.
* Put in in Global scope
2016-11-11 15:42:11 +00:00
*/
2016-11-14 10:31:32 +00:00
window.randomizer = {
/**
* Get a random integer between 0 and items length.
*
* @return {string} a random integer
*/
getItem: function (){
var l = items.length - 1;
var n = Math.round(Math.random() * l);
2016-11-11 15:42:11 +00:00
2016-11-14 10:31:32 +00:00
return items[n];
}
2016-11-11 15:42:11 +00:00
};
})();