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:
parent
ee2462a40c
commit
d1a2c2231d
@ -98,7 +98,8 @@ body {
|
|||||||
var newP = document.createElement('p');
|
var newP = document.createElement('p');
|
||||||
newH1.innerHTML = message;
|
newH1.innerHTML = message;
|
||||||
newP.innerHTML = "by "+censoredNumber+" at "+time;
|
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.className="jumbotron";
|
||||||
newDiv.appendChild(newH1);
|
newDiv.appendChild(newH1);
|
||||||
newDiv.appendChild(newP);
|
newDiv.appendChild(newP);
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
$('#clear').click(function() {
|
$('#clear').click(function() {
|
||||||
var number = $('#number').val();
|
var number = $('#number').val();
|
||||||
iosocket.emit('clear',number);
|
iosocket.emit('clear',number);
|
||||||
|
alert("cleared");
|
||||||
});
|
});
|
||||||
$('#refresh').click(function() {
|
$('#refresh').click(function() {
|
||||||
iosocket.emit('refreshClients');
|
iosocket.emit('refreshClients');
|
||||||
|
@ -71,7 +71,7 @@ function initSocketIO(httpServer,debug)
|
|||||||
|
|
||||||
socket.on('clear', function(number) {
|
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.object.messages.splice(index,1);
|
||||||
db.write();
|
db.write();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user