Skip to content

Commit

Permalink
Updated chatbox selectors to use classes for CB's current state
Browse files Browse the repository at this point in the history
  • Loading branch information
daffodildil authored and qdot committed Oct 6, 2020
1 parent 24fe63f commit 1dfb7ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/chaturbate-tips-buttplug.user.js
Expand Up @@ -43,11 +43,11 @@ function newTipsOccurred(tips) {
}
window.addEventListener('load', async function() {
(function() {
let chatbox = $('#chat-box')[0];
let chatbox = $('.chat-box')[0];
let lastTipCount = 0;
chatbox.addEventListener('DOMNodeInserted', async function(event){
let tips = Array
.apply(null, $('#chat-box span.emoticonImage')
.apply(null, $('.chat-box span.emoticonImage')
.closest('div:not([data-nick]):has(span[style])'))
.filter(x => x.querySelector('span.emoticonImage').innerHTML.match(/tipped \d+ token(s)?/))
.map(x => {
Expand All @@ -73,4 +73,4 @@ window.addEventListener('load', async function() {
}
});
})();
}, false);
}, false);

0 comments on commit 1dfb7ee

Please sign in to comment.