Greasy Fork 支持简体中文。

아카라이브 깡계확인_폰트수정,댓글수정

깡계확인 스크립트

// ==UserScript==
// @name         아카라이브 깡계확인_폰트수정,댓글수정
// @namespace    http://kemomimi.com/
// @version      1.3
// @description  깡계확인 스크립트
// @match        https://arca.live/b/*/*
// @grant        GM_xmlhttpRequest
// ==/UserScript==

// 댓글확인
const commentUserLinks = document.querySelectorAll('.list-area .user-info a');
commentUserLinks.forEach(commentUserLink => {
    if (commentUserLink) {
    const commentTargetURL = commentUserLink.href;
    console.log(commentTargetURL);
    console.log('첫 번째 링크의 href:', commentTargetURL);
    GM_xmlhttpRequest({
        method: 'GET',
        url: commentTargetURL,
        onload: function(response) {
            const htmlData = response.responseText;
            const parser = new DOMParser();
            const doc = parser.parseFromString(htmlData, 'text/html');
            if(doc.querySelectorAll('.error-code').length >=1){
                commentUserLink.style.fontSize = '13.5px';
                commentUserLink.style.fontWeight = 'bold';
                commentUserLink.style.color = 'red';
                commentUserLink.style.textDecoration = 'line-through';
                commentUserLink.textContent += ' (삭제된 계정)';
                console.log("삭제된 계정");
            }else{
                const cardBlockElement = doc.querySelector('.card-block');
                const childNodes = cardBlockElement.childNodes;
                var post = 0
                var coment = 0
                var flag = 0
                for (const node of childNodes) {
                    if (node.nodeType === Node.ELEMENT_NODE) {
                        if(node.className == "clearfix"){
                            flag+=1
                        }
                        if(node.className== "user-recent" && flag==0){
                            post+=1
                            console.log("게시글");
                        }else if(node.className== "user-recent" && flag==1){
                            coment+=1
                            console.log("덧글");
                        }
                    }
                }
                if(post<=14 || coment<=14){
                    commentUserLink.style.fontSize = '13.5px';
                    commentUserLink.style.fontWeight = 'bold';
                    commentUserLink.style.color = 'red';
                    commentUserLink.textContent += ' (최근 글:'+post+' 댓글:'+coment+')';
                }else{
                    //commentUserLink.textContent += ' (최근 글:'+post+' 댓글:'+coment+')';
                }
            }
        }
    });
} else {
    console.log('링크를 찾을 수 없음');
}
});


const firstLink = document.querySelector('.info-row .user-info a');
if (firstLink) {
    const targetURL = firstLink.href;
    console.log(firstLink);
    console.log('첫 번째 링크의 href:', targetURL);
    // GET 요청 보내기
    GM_xmlhttpRequest({
        method: 'GET',
        url: targetURL,
        onload: function(response) {
            const htmlData = response.responseText;
            const parser = new DOMParser();
            const doc = parser.parseFromString(htmlData, 'text/html');
            if(doc.querySelectorAll('.error-code').length >=1){
                firstLink.style.fontSize = '13.5px';
                firstLink.style.fontWeight = 'bold';
                firstLink.style.color = 'red';
                firstLink.style.textDecoration = 'line-through';
                firstLink.textContent += ' (삭제된 계정)';
                console.log("삭제된 계정");
            }else{
                const cardBlockElement = doc.querySelector('.card-block');
                const childNodes = cardBlockElement.childNodes;
                var post = 0
                var coment = 0
                var flag = 0
                for (const node of childNodes) {
                    if (node.nodeType === Node.ELEMENT_NODE) {
                        if(node.className == "clearfix"){
                            flag+=1
                        }
                        if(node.className== "user-recent" && flag==0){
                            post+=1
                            console.log("게시글");
                        }else if(node.className== "user-recent" && flag==1){
                            coment+=1
                            console.log("덧글");
                        }
                    }
                }
                if(post<=14 || coment<=14){
                    firstLink.style.fontSize = '13.5px';
                    firstLink.style.fontWeight = 'bold';
                    firstLink.style.color = 'red';
                    firstLink.textContent += ' (최근 글:'+post+' 댓글:'+coment+')';
                }else{
                    //firstLink.textContent += ' (최근 글:'+post+' 댓글:'+coment+')';
                }
            }
        }
    });
} else {
    console.log('링크를 찾을 수 없음');
}