Created
July 29, 2014 17:07
-
-
Save ashtonkj/e22dd856322609e36517 to your computer and use it in GitHub Desktop.
Stack Overflow Chat - Check for New Users
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:function somethingChanged(changes) { | |
changes.forEach( function ( change, i ) { | |
$("#chat").append('<div class="user-container user-24793 monologue mine catchup-marker catchup-marker-2"> | |
<a href="/users/24793/ashtonkj" class="signature user-24793"> | |
<div class="tiny-signature"> | |
<div class="avatar avatar-16"> | |
<img width="16" height="16" src="http://cdn.sstatic.net/stackoverflow/img/logo.png?v=c4" alt="AshtonKJ" title="AshtonKJ"> | |
</div> | |
<div class="username">The Room</div> | |
</div> | |
<div class="avatar avatar-32 clear-both" style="display: none;"> | |
<img width="32" height="32" src="http://cdn.sstatic.net/stackoverflow/img/logo.png?v=c4" alt="AshtonKJ" title="AshtonKJ"> | |
<div> | |
</div> | |
</div> | |
<div class="username" style="display: none;">The Room</div><div class="flair" title="878" style="display: none;">878</div> | |
</a><div class="messages"><div class="message" id="message-17980239"><a class="action-link" title="click for message actions" href="/transcript/message/17980239#17980239"><span class="img menu"> </span></a><div class="content">' + 'User: ' + change.object[change.name]['name'] + ' joined. </div><span class="meta"><span class="flags vote-count-container"><span class="img"></span><span class="times"></span></span> <span class="stars vote-count-container"><span class="img"></span><span class="times"></span></span></span><span class="flash"><span class="stars vote-count-container"><span class="img"></span><span class="times"></span></span></span></div></div><div class="clear-both" style="height: 0px;"> </div> | |
</div>'); | |
}); | |
} | |
Object.observe(window.users, somethingChanged,['add']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment