Last active
November 6, 2017 15:09
-
-
Save jhlee8804/54e81a096cc8e2a1432a2a1598be30ab to your computer and use it in GitHub Desktop.
코인원 채팅 메시지 개수 줄이기
This file contains hidden or 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
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