tip randomiser added
This commit is contained in:
parent
9a0d28720d
commit
1a91f4953b
20
close.html
20
close.html
|
@ -3,14 +3,18 @@
|
||||||
<link rel="stylesheet" href="css/all.css"/>
|
<link rel="stylesheet" href="css/all.css"/>
|
||||||
<!--#include virtual="title.html" -->
|
<!--#include virtual="title.html" -->
|
||||||
<script><!--#include virtual="/interface_config.js" --></script>
|
<script><!--#include virtual="/interface_config.js" --></script>
|
||||||
<script>function translateStr(id, msg) {
|
<script src="static/randomizer.js"></script>
|
||||||
var div = document.getElementById(id);
|
<script>
|
||||||
div.innerHTML = msg;
|
var randomizer = new Randomizer();
|
||||||
}
|
|
||||||
function translate() {
|
function translateStr(id, msg) {
|
||||||
translateStr('hintMessage',
|
var div = document.getElementById(id);
|
||||||
'You can pin participants by clicking on their thumbnails');
|
div.innerHTML = msg;
|
||||||
}
|
}
|
||||||
|
function translate() {
|
||||||
|
translateStr('hintMessage',
|
||||||
|
randomizer.getItem());
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="translate();">
|
<body onload="translate();">
|
||||||
|
|
24
close2.html
24
close2.html
|
@ -3,16 +3,20 @@
|
||||||
<link rel="stylesheet" href="css/all.css"/>
|
<link rel="stylesheet" href="css/all.css"/>
|
||||||
<!--#include virtual="title.html" -->
|
<!--#include virtual="title.html" -->
|
||||||
<script><!--#include virtual="/interface_config.js" --></script>
|
<script><!--#include virtual="/interface_config.js" --></script>
|
||||||
<script>function translateStr(id, msg) {
|
<script src="static/randomizer.js"></script>
|
||||||
var div = document.getElementById(id);
|
<script>
|
||||||
div.innerHTML = msg;
|
var randomizer = new Randomizer();
|
||||||
}
|
|
||||||
function translate() {
|
function translateStr(id, msg) {
|
||||||
translateStr('thanksMessage',
|
var div = document.getElementById(id);
|
||||||
'Thank you for using ' + interfaceConfig.APP_NAME);
|
div.innerHTML = msg;
|
||||||
translateStr('hintMessage',
|
}
|
||||||
'You can pin participants by clicking on their thumbnails');
|
function translate() {
|
||||||
}
|
translateStr('thanksMessage',
|
||||||
|
'Thank you for using ' + interfaceConfig.APP_NAME);
|
||||||
|
translateStr('hintMessage',
|
||||||
|
randomizer.getItem());
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body onload="translate();">
|
<body onload="translate();">
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
|
||||||
|
(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
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a new Randomiser.
|
||||||
|
*
|
||||||
|
* @class
|
||||||
|
*/
|
||||||
|
function Randomizer(){
|
||||||
|
this.items = items;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a random integer between 0 and items length.
|
||||||
|
*
|
||||||
|
* @return {string} a random integer
|
||||||
|
*/
|
||||||
|
Randomizer.prototype.getItem = function (){
|
||||||
|
var l = this.items.length - 1;
|
||||||
|
var n = Math.round(Math.random() * l);
|
||||||
|
|
||||||
|
return this.items[n];
|
||||||
|
};
|
||||||
|
|
||||||
|
window.Randomizer = Randomizer;
|
||||||
|
})();
|
||||||
|
|
Loading…
Reference in New Issue