Skip to content

Commit

Permalink
Reloading in case of token expiration. Better FF styling.
Browse files Browse the repository at this point in the history
  • Loading branch information
pamelafox-coursera committed Aug 23, 2012
1 parent ae96fd3 commit 0679091
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions app/static/simplechat.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
* {
box-sizing: border-box;
}
* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; }

select, textarea, input[type="text"], input[type="password"], input[type="datetime"], input[type="datetime-local"], input[type="date"], input[type="month"], input[type="time"], input[type="week"], input[type="number"], input[type="email"], input[type="url"], input[type="search"], input[type="tel"], input[type="color"], .uneditable-input {
height: 26px;
Expand All @@ -21,8 +19,12 @@ select, textarea, input[type="text"], input[type="password"], input[type="dateti
font-size: 12px;
}

#chat-name {
font-size: 10px;
}

#chat-bottom input {
font-size: 12px;
font-size: 10px;
height: 18px;
}

Expand Down
3 changes: 2 additions & 1 deletion app/static/simplechat.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ $(document).ready(function(){

socket.onerror = function(err) {
console.log('Socket err:' + err);
if (err) { window.location.reload(); }
};
socket.onclose = function() {
console.log('Socket closed');
Expand All @@ -101,7 +102,7 @@ $(document).ready(function(){
});

$(window).on('resize', resizeChat);

$(window).on('message', function(event) {
console.log(event);
if (event.originalEvent.origin == 'http://class.coursera.org' || event.originalEvent.origin == 'https://class.coursera.org') {
Expand Down

0 comments on commit 0679091

Please sign in to comment.