Skip to content

Commit

Permalink
use lib
Browse files Browse the repository at this point in the history
  • Loading branch information
skinass committed Jul 25, 2018
1 parent b3c2e29 commit f736611
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 49 deletions.
2 changes: 1 addition & 1 deletion static/html/joinchat.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.2/rollups/md5.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.8/js/materialize.min.js"></script>
<script src="/js/lib/blinktitle.js"></script>
<script src="/js/lib/PageTitleNotification.js"></script>
<script src="/js/chat/chat.js"></script>
</body>
</html>
6 changes: 5 additions & 1 deletion static/js/chat/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ const EventConnInitOk = 0;
const EventConnInitNoSuchChat = 1;
const EventConnInitMaxUsrsReached = 2;

const NewMsgTitle = "New message!";

new Vue({
el: '#app',

Expand All @@ -16,6 +18,8 @@ new Vue({
okconnected: true, // True if email and username have been filled in
fail: false,
name: '',
onPage: false,
newMessagesNum: 0,
},
created: function() {
var self = this;
Expand Down Expand Up @@ -47,7 +51,7 @@ new Vue({
methods: {
addmsg: function(msg){
if (document.hidden) {
blinkTitle("TechnoChat", "New message!", 1200, true);
pageTitleNotification.on(BlinkTitleNewMsg);
}
this.chatContent += '<div class="chip" >'
+ '<img src="' + this.roboHash(msg.username) + '">' // Avatar
Expand Down
1 change: 1 addition & 0 deletions static/js/lib/PageTitleNotification.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

47 changes: 0 additions & 47 deletions static/js/lib/blinktitle.js

This file was deleted.

0 comments on commit f736611

Please sign in to comment.