-
Notifications
You must be signed in to change notification settings - Fork 0
/
greet-newcomers-local.bookmarklet
1 lines (1 loc) · 1.62 KB
/
greet-newcomers-local.bookmarklet
1
javascript:(function()%7B%22use%20strict%22%3B!function()%7Bvar%20e%3Dwindow.document.querySelector(%22.chat-room%22)%3Bwindow.greet_newcomers%26%26(window.greet_newcomers.disconnect()%2Ce.querySelectorAll(%22.chat-line__message%20.chat-author__display-name%22).forEach(function(e)%7Be.textContent%3De.textContent.replace(%2F%5E%F0%9F%91%8B%20%2F%2C%22%22)%7D))%3Bvar%20o%3Dnew%20Set%3Bfunction%20t(e)%7Bvar%20t%3De.querySelector(%22.chat-author__display-name%22)%3Bif(t)%7Bvar%20r%3Dt.textContent%3Bo.has(r)%7C%7C(t.textContent%3D%22%F0%9F%91%8B%20%22%2Br%2Co.add(r))%7D%7De.querySelectorAll(%22.chat-line__message%22).forEach(t)%2Cwindow.greet_newcomers%3Dnew%20MutationObserver(function(e)%7Be.forEach(function(e)%7Be.addedNodes.forEach(t)%7D)%7D)%2Cwindow.greet_newcomers.observe(e%2C%7BchildList%3A!0%2Cattributes%3A!1%2CcharacterData%3A!1%2Csubtree%3A!1%7D)%3Bvar%20r%3De.querySelector(%22.scrollable-trigger__wrapper%22)%2Cn%3De.insertBefore(window.document.createElement(%22div%22)%2Cr)%3Bn.setAttribute(%22class%22%2C%22chat-line__status%22)%3Bvar%20a%3Dn.appendChild(window.document.createElement(%22span%22))%2Cc%3D%22fr%22%3D%3D%3Dwindow.navigator.language.replace(%2F%5C-.*%2F%2C%22%22)%3F%22Affichage%20des%20nouveaux%20viewers%20%F0%9F%91%8B%20Rafraichir%20la%20page%20pour%20arr%C3%AAter.%20Ce%20message%20est%20visible%20uniquement%20par%20vous.%22%3A%22Now%20showing%20new%20viewers%20%F0%9F%91%8B%20Refresh%20the%20page%20to%20stop.%20This%20message%20is%20only%20visible%20to%20you.%22%3Ba.textContent%3Dc%3Bvar%20s%3Dwindow.document.querySelector(%22.chat-room%20.simplebar-scroll-content%22)%3Bs.scrollTop%3Ds.scrollHeight%7D()%3B%7D)()