Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reloading in case of token expiration. Better FF styling.

  • Loading branch information...
commit 067909102d2c323466ff399b0cb8c34c5b8ffc44 1 parent ae96fd3
@pamelafox-coursera pamelafox-coursera authored
Showing with 8 additions and 5 deletions.
  1. +6 −4 app/static/simplechat.css
  2. +2 −1  app/static/simplechat.js
View
10 app/static/simplechat.css
@@ -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;
@@ -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;
}
View
3  app/static/simplechat.js
@@ -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');
@@ -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') {
Please sign in to comment.
Something went wrong with that request. Please try again.