2
1
mirror of https://github.com/s00500/nodeMessageBoard.git synced 2024-11-23 11:20:54 +00:00

Added fix for Safari colors

This commit is contained in:
Lukas Bachschwell 2016-03-15 15:19:33 +01:00
parent ee2462a40c
commit d1a2c2231d
3 changed files with 4 additions and 2 deletions

View File

@ -98,7 +98,8 @@ body {
var newP = document.createElement('p');
newH1.innerHTML = message;
newP.innerHTML = "by "+censoredNumber+" at "+time;
newDiv.style="background:"+getColor(color)+" !important; padding:10px 0; margin:10px 0;";
newDiv.style.backgroundColor = getColor(color); //need this on both for some browsers (especially safari) to recognize...
newDiv.style="background-color:"+getColor(color)+" !important; padding:10px 0; margin:10px 0;";
newDiv.className="jumbotron";
newDiv.appendChild(newH1);
newDiv.appendChild(newP);

View File

@ -36,6 +36,7 @@
$('#clear').click(function() {
var number = $('#number').val();
iosocket.emit('clear',number);
alert("cleared");
});
$('#refresh').click(function() {
iosocket.emit('refreshClients');

View File

@ -71,7 +71,7 @@ function initSocketIO(httpServer,debug)
socket.on('clear', function(number) {
var index = db.object.messages.length - 1;
var index = db.object.messages.length - number;
db.object.messages.splice(index,1);
db.write();