-
-
Save iamso1/e1239501856f9fe6cf543125e71b0cd8 to your computer and use it in GitHub Desktop.
test
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
var container = document.querySelector('#root > div > div.tw-flex.tw-full-height.tw-full-width > div > div > section > div > div.chat-list.tw-flex.tw-flex-column.tw-flex-grow-1.tw-flex-nowrap.tw-overflow-hidden > div.chat-list__lines.tw-flex-grow-1.scrollable-area > div.simplebar-scroll-content > div'); | |
var observer = new MutationObserver(function() { | |
const content=document.querySelector('.simplebar-content > div> div:nth-last-child(2)').textContent; | |
if(content.indexOf('來抽便便')>1) | |
document.querySelector('#root > div > div.tw-flex.tw-full-height.tw-full-width > div > div > section > div > div.chat-input.tw-block.tw-pd-b-1.tw-pd-x-1 > div:nth-child(2) > div.tw-block.tw-relative.tw-z-default > div > div:nth-child(2) > div > div > textarea').value='!join' | |
document.querySelectorAll('.tw-mg-l-05')[1].querySelector('button').click(); | |
}); | |
observer.observe(container, {subtree: true, childList: true}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment