// ==UserScript== // @name 치지직 팔로우 목록 자동 새로고침 + 자동 펼치기 // @name:en Chzzk Auto Follow Refresher // @namespace http://tampermonkey.net/ // @version 1.12 // @description 팔로우 목록을 원하는 시간마다 반복 새로고침 + 팔로우 목록을 자동으로 전부 펼칩니다. // @description:en Automatically refreshes the Chzzk sidebar follow list every 60 seconds and expands all followed channels once until the collapse button appears. // @match *://chzzk.naver.com/* // @grant none // @author Lusyeon | 루션 // @license MIT // @downloadURL none // ==/UserScript== (function () { 'use strict'; const refreshInterval = 60000; // 1분마다 새로고침 1초당 1000 setInterval(() => { const refreshBtn = Array.from(document.querySelectorAll('button.navigator_button__BbAEb')) .find(btn => btn.textContent.includes("새로고침")); if (refreshBtn) { refreshBtn.click(); } }, refreshInterval); window.addEventListener('load', () => { const clickAllMoreButtons = () => { const moreBtn = document.querySelector('button.navigator_button_more__UE0v3[aria-expanded="false"]'); if (moreBtn) { moreBtn.click(); return true; } return false; }; const observer = new MutationObserver(() => { const isClicked = clickAllMoreButtons(); if (!isClicked) { setInterval(() => { clickAllMoreButtons(); }, refreshInterval); } }); observer.observe(document.body, { childList: true, subtree: true }); setTimeout(() => { clickAllMoreButtons(); }, 10000); }); })();