Skip to content

Instantly share code, notes, and snippets.

@jhlee8804
Last active November 6, 2017 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhlee8804/54e81a096cc8e2a1432a2a1598be30ab to your computer and use it in GitHub Desktop.
Save jhlee8804/54e81a096cc8e2a1432a2a1598be30ab to your computer and use it in GitHub Desktop.
코인원 채팅 메시지 개수 줄이기
var $chatList = $('.chat_list');
if ($chatList.length > 0) {
setInterval(function () {
var controller = angular.element($chatList).scope(),
messages = controller.messages,
count = messages.length,
limit = 100;
if (count > limit) {
var offset = count - limit;
controller.messages = messages.splice(offset, limit);
console.log('total messages count: %d, removed count: %d', count, offset);
}
}, 60 * 1000);
console.log('coinone_chat_shrink.js injected!!!');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment