전체 글 삭제 매크로
게시글 주소: https://orbi.kr/00073503041
오류 알려주세요..
1. 자기 글 목록 열고, F12 누르기
2. console(콘솔) 탭 클릭
3. 아래 코드 붙여넣기 후 엔터
(붙여넣기 안 되면 allow pasting 입력 하고나서 다시)
(async function() {
const scrollDelayMs = 1000;
const deleteDelayMs = 100;
let deletedCount = 0;
let errorCount = 0;
let articleIdsToDelete = [];
async function autoScrollToBottom() {
let lastScrollHeight = 0;
while (true) {
window.scrollTo(0, document.body.scrollHeight);
await new Promise(resolve => setTimeout(resolve, scrollDelayMs));
const newScrollHeight = document.body.scrollHeight;
if (newScrollHeight === lastScrollHeight) {
break;
}
lastScrollHeight = newScrollHeight;
}
}
function collectArticleIds() {
const articleLinks = document.querySelectorAll('.timeline-wrap article .content');
const ids = [];
articleLinks.forEach(link => {
const href = link.getAttribute('href');
const match = href.match(/\/(\d+)\//);
if (match && match[1]) {
ids.push(match[1]);
}
});
return [...new Set(ids)];
}
async function deleteArticle(articleId) {
const deleteUrl = `/delete/${articleId}`;
try {
const response = await fetch(deleteUrl, {
method: 'POST',
credentials: 'include',
headers: {
'Accept': 'application/json, text/plain, */*',
'Accept-Language': 'ko-KR,ko;q=0.9',
'Content-Length': '0',
'Referer': `https://orbi.kr/000${articleId}`,
'sec-ch-ua': '"Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-origin'
},
body: null
});
if (response.ok) {
const data = await response.json();
if (data.success) {
deletedCount++;
const articleElement = document.querySelector(`a[href*="/${articleId}/"]`);
if(articleElement) {
articleElement.closest('article').remove();
}
} else {
errorCount++;
}
} else {
errorCount++;
}
} catch (error) {
errorCount++;
}
}
await autoScrollToBottom();
articleIdsToDelete = collectArticleIds();
if (articleIdsToDelete.length === 0) {
return;
}
let currentIndex = 0;
const autoDeleteIntervalId = setInterval(async () => {
if (currentIndex < articleIdsToDelete.length) {
const articleId = articleIdsToDelete[currentIndex];
await deleteArticle(articleId);
currentIndex++;
} else {
clearInterval(autoDeleteIntervalId);
}
}, deleteDelayMs);
})();
0 XDK (+0)
유익한 글을 읽었다면 작성자에게 XDK를 선물하세요.
-
생일조사 3
-
나 20살에 엄마 46세심
-
바벨 올리기 힘듦
-
답변 부탁드립니다.. ㅜㅜ
-
도움이 필요합니다 우선 제 얘기 먼저 하죠 하.. 저는 치대를 원했습니다.....
-
두부김치와 막걸리를 먹는거임......
-
게이됨
-
누워서 영단어 3
외워도되나...ㅎ 넘피건하당
-
이도저도 아니다가 둘다 놓치게되고..
-
1년안에
-
지금부터리그오브레전드를시작하여 팀기원매스에코백을들고 롤드컵결승에오르겠습니다.....
-
화1으로 나중에 돌아갈 가능성이 있어서 여쭈어봅니다.
-
시대러들 집중! 4
다들 오늘 저 푸셧나요
-
재수 커리큘럼 3
짜는 중 ㅎㅎ
-
윤이 경제 좋게 말해서 망쳐논거 꾹꾹 숨기고 있다가 ㅈ된상황 기사 ㅈㄴ 내면서 이재명한테 돌릴거임 1
남이싼똥치워야되고 ㅋㅋ 세금은 저리 많이 쓰고 아웃풋은 개망 ㅋ 25만원 안줘도...
-
정답을 바르게 표기하면 된다는거임
-
29
-
평 보니까 7~12번 수준이라는데 이게 사설기준 7~12번인가? 6평 기준이면...
-
원바 하고싶다 4
점심시간에 원바팟 구하기 마렵네
-
될대로돼라임 그러면 두지문 못풀어도 수학시간에 타격 없음
오오???
아 컴공지망생 방금 꿈 포기했습니다
ai한테 아이디어 많이 얻었습니다 저도 초보자에요