


오상구
•2026.01.12 15:41:41
오픈코드니까 불안하면 AI한테 물어보셈)
먼저 스크립트를 실행해 줄 **'Tampermonkey(탬퍼몽키)'**라는 확장 프로그램을 깔아야 합니다. (유명하고 안전한 프로그램입니다.)
https://chromewebstore.google.com/?utm_source=ext_app_menu
이 주소로 들어가면 크롬 웹스토어가 나오는데 검색창에 Tampermonkey 를 검색해서 설치해줍니다
브라우저 우측 상단에 생긴 **검은색 네모 아이콘(Tampermonkey)**을 클릭하세요. (안 보이면 퍼즐 조각🧩 아이콘을 눌러보세요.)
메뉴에서 **[ + 새 스크립트 만들기 ]**를 클릭합니다.
화면에 뭔가 코드가 적혀있을 텐데, 싹 다 지워서 빈칸으로 만드세요.
아래 코드를 복사해서 그 자리에 그대로 붙여넣기(Ctrl+V) 하세요.
// ==UserScript==
// @name 거타 채팅 도배 차단기 V29.1 (스크롤 수정본)
// @namespace http://tampermonkey.net/
// @version 29.1
// @description 도배 차단 시 스크롤이 멈추거나 튕기는 현상을 해결했습니다.
// @author User
// @match https://geota.co.kr/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const blockList = ["즐라탄"];
const historyCounts = {};
function superClean(text) {
return text.replace(/[^가-힣ㄱ-ㅎㅏ-ㅣa-zA-Z0-9]/g, '');
}
function isSpam(el) {
try {
const rawText = el.innerText;
const cleanText = superClean(rawText);
if (cleanText.length === 0) {
if (el.querySelector('img')) return false;
return true;
}
if (blockList.some(keyword => cleanText.includes(keyword))) {
return true;
}
const count = (historyCounts[cleanText] || 0) + 1;
if (cleanText.length > 10) {
return count > 1;
} else {
return count > 4;
}
} catch (e) {
return false;
}
}
function checkAndAct(el) {
const row = el.closest('.self-stretch');
if (!row || row.id === 'geota-chatting-window' || row.classList.contains('custom-scrollbar-y')) return;
const cleanText = superClean(el.innerText);
if (isSpam(el)) {
if (row.style.display !== 'none') {
row.style.display = 'none'; // 차단
if (cleanText) historyCounts[cleanText] = (historyCounts[cleanText] || 0) + 1;
}
} else {
if (row.style.display === 'none') {
row.style.display = '';
}
if (cleanText) historyCounts[cleanText] = (historyCounts[cleanText] || 0) + 1;
}
}
// --- 스크롤 보정 핵심 로직 ---
function anchorScroll(chatWindow) {
// 거타 사이트 특성에 맞게 스크롤 컨테이너를 찾습니다.
const scrollContainer = chatWindow.querySelector('.custom-scrollbar-y') || chatWindow;
// 사용자가 바닥에서 200px 이내에 있다면 (바닥에 붙어있다고 간주)
const threshold = 200;
const isAtBottom = scrollContainer.scrollHeight - scrollContainer.scrollTop - scrollContainer.clientHeight <= threshold;
if (isAtBottom) {
// 차단으로 인해 높이가 변한 직후에 실행되도록 2단계 프레임 예약
requestAnimationFrame(() => {
scrollContainer.scrollTop = scrollContainer.scrollHeight;
// 일부 브라우저 대응을 위해 한번 더 실행
setTimeout(() => {
scrollContainer.scrollTop = scrollContainer.scrollHeight;
}, 10);
});
}
}
function startEngine() {
const chatWindow = document.getElementById('geota-chatting-window');
if (!chatWindow) {
setTimeout(startEngine, 500);
return;
}
const observer = new MutationObserver((mutations) => {
let shouldFixScroll = false;
mutations.forEach((mutation) => {
if (mutation.type === 'childList' && mutation.addedNodes.length > 0) {
mutation.addedNodes.forEach((node) => {
if (node.nodeType !== 1) return;
const textEl = node.querySelector('.text-sm.font-medium.leading-normal');
if (textEl) {
checkAndAct(textEl);
shouldFixScroll = true;
}
});
}
});
if (shouldFixScroll) {
anchorScroll(chatWindow);
}
});
observer.observe(chatWindow, {
childList: true,
subtree: true
});
// 보조 순찰 및 카운트 초기화
setInterval(() => {
// 카운트를 초기화하면 다시 1부터 쌓이므로 무분별한 차단을 방지합니다.
for (let key in historyCounts) delete historyCounts[key];
const targets = chatWindow.querySelectorAll('.text-sm.font-medium.leading-normal');
let changed = false;
targets.forEach(el => {
checkAndAct(el);
changed = true;
});
if (changed) anchorScroll(chatWindow);
}, 500);
}
startEngine();
})();
코드를 다 넣으셨으면 키보드 Ctrl + S를 누르세요.
거타 사이트에 가서 새로고침(F5) 한 번 해주면 끝입니다!
새로 생긴 확장프로그램에 숫자1이 보인다면 잘 작동하고있다는뜻입니다.
전체 댓글 12개









| 번호 | 분류 | 제목 | 글쓴이 | 작성일 | 조회 | 추천 |
|---|---|---|---|---|---|---|
| 131 | 공지 | 거상을 더 즐겁게! 유저 중심 커뮤니티, 거타를 소개합니다. [23] | 관리자 | 02.28 | 50,139 | 76 |
| 115 | 공지 | 자유 게시판 이용안내 [12] | 관리자 | 02.28 | 38,895 | 5 |
| 163 | 자유 | ㅋㅋㅋ(61.82) | 03.04 | 5707 | 4 | |
| 152 | 자유 | 오늘의 운세~[8] | ㅇㅇ(14.5) | 03.04 | 4281 | 1 |
| 151 | 자유 | 날씨가[2] | ㅇㅇ(45.143) | 03.04 | 4827 | 0 |
| 147 | 자유 | 오호 이건 또 무언가?[4] | 조조맹덧(14.5) | 03.04 | 5008 | 0 |
| 145 | 자유 | ㅇㅅㅇ[10] | ㅇㅇ(121.140) | 03.03 | 5211 | 0 |
| 141 | 자유 | 뉴비다 질문 받는다[9] | ㅇㅇ(94.156) | 03.03 | 5400 | 0 |
| 139 | 자유 | 신기하네요 [4] | 로또(59.15) | 03.03 | 5161 | 0 |
| 136 | 자유 | 200% 경험치 곧.[4] | ㅇㅇ(45.143) | 03.03 | 5812 | 1 |
| 135 | 자유 | 오오오오오[141] | ㅇㅇ(121.140) | 03.03 | 4533 | 1 |
| 131 | 자유 | 관리자(121.140) | 02.28 | 50139 | 76 | |
| 115 | 자유 | 자유 게시판 이용안내[12] | 관리자(121.140) | 02.28 | 38895 | 5 |