bigbluebutton-Github/bigbluebutton-client/resources/prod/lib/bbb_blinker.js

51 lines
1.3 KiB
JavaScript
Raw Normal View History

var blinkTimer = false;
var blinking = false;
var startblink = function(message1, message2)
{
if(!blinking)
{
document.title = (document.title == message2)?message1:message2;
blinkTimer = window.setTimeout("blinktitle('" + message1 + "', '" + message2 + "', 1)", 500);
blinking = true;
}
}
var blinktitle = function(message1, message2)
{
document.title = (document.title == message2)?message1:message2;
blinkTimer = window.setTimeout("blinktitle('" + message1 + "', '" + message2 + "', 1)", 500);
}
var clearblink = function()
{
blinking = false;
if(blinkTimer)
{
window.clearTimeout(blinkTimer);
}
document.title = 'BigBlueButton';
}
2012-08-10 02:14:20 +08:00
var i = 1;
function addAlert(message){
var target = document.getElementById( 'notifications' ),
contentDiv = document.createElement( "div" );
contentDiv.id = "alertDiv" + i;
i++;
//contentDiv.innerHTML = "<p>" + message + "</p>";
contentDiv.innerHTML = message;
2012-08-10 02:14:20 +08:00
contentDiv.style.display = "block";
target.appendChild( contentDiv );
target.hide();
target.setAttribute("role","alert");
2012-08-10 02:14:20 +08:00
target.show();
contentDiv.hide();
contentDiv.setAttribute("role","alert");
2012-08-10 02:14:20 +08:00
contentDiv.show();
}
function determineBrowser()
{
return navigator.appName;
}