kone
소미소프트

소미소프트

전체글 버튼을 만들어주세요

05/27/2025, 07:00:13
유틸
3230 views · 6 likes

하루종일 글 읽고 다시 전체 글목록으로 돌아가는데 좀 편하게 하고 싶어서 스크립트 싸옴


1


곧 고쳐질거같아서 과도기에나 잠깐 쓸법하여 그냥 코드로만 배포함

본인 css는 잘몰라서 그냥 대충 옆에 버튼 배껴 쓴거니까 잘못됐다 싶은건 classes 에서 삭제해서 사용하셈


greasemonkey, tampermonkey, violentmonkey 사용중이라면 아래 코드 임포트후 사용하면 되시겠다

무슨말인지 모르겠다면 무시


추가 >> ㅈㅅㅈㅅ 제일 아래에도 개념글 버튼이 있는 걸 모르고 리스트 상위에만 버튼 넣었음

버전 0.2로 업데이트 했읍니다


// ==UserScript==
// @name         make all article button
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  전체 글 호출 
// @match        https://kone.gg/s/*
// @grant        none
// @run-at       document-idle
// ==/UserScript==

(function () {
    'use strict';

    function buildButton() {
        const classes = "focus-visible:border-ring aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:hover:bg-input/50 flex items-center justify-between gap-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none disabled:cursor-not-allowed disabled:opacity-50 border-zinc-300 focus-visible:ring-1 focus-visible:ring-blue-500 dark:border-zinc-600 cursor-pointer !h-8 p-0 rounded-full bg-zinc-100 dark:bg-zinc-700 border-0 px-3";
        return `<button data-slot="button" data-added="all" class="${classes}">전체글</button>`;
    }

    function getSubUrl() {
        return location.origin + location.pathname.match(/^\/s\/[^\/]+/)[0];
    }

    function attachButton() {
        const anchors = Array.from(document.querySelectorAll('a > button'))
            .filter(btn => btn.textContent.includes('개념글'))
            .map(btn => btn.parentElement);

        if (!anchors.length) return false;

        anchors.forEach(anchor => {
            const btnParent = anchor.parentElement;
            if (!btnParent) return;

            if (btnParent.querySelector('button[data-slot="button"][data-added="all"]')) return;

            const wrapper = document.createElement('a');
            wrapper.href = getSubUrl();
            wrapper.innerHTML = buildButton();

            btnParent.insertBefore(wrapper, anchor);
        });

        return true;
    }


    const observer = new MutationObserver(() => {
        attachButton();
    });
    observer.observe(document.body, {
        childList: true,
        subtree: true,
    });
})();

6
4 comments
05/27/25
이거 ㄹㅇ 필요했음
좋네용 애초에 개념글이랑 전체글 버튼을 분리해놨으면 좋앗을텐데..
05/27/25
당신같은 남자를 기다려왔다우
05/27/25
와우.. 능력자
조이플 오류 및 패치 + 유틸
유틸
yeppi
03/04 12024 34
야식메뉴판 Plus 만들어왔음 - 게임 방주 관리 데스크톱 앱
유틸
qqoro
03/04 15117 77
이터넘 0.9 옛날 버전 브금 모드
유틸
외않되
03/04 3855 5
RJ01389782 비밀 노출 마나카 커스텀 미션 번역2
유틸
ㅇㅇ
03/03 14417 18
렌파이 전용 언락커 ( 갤러리 언락가능 )
유틸
하이바라
03/03 5047 12
ai번역)RJ01389782 비밀 노출 마나카 모드와 미션 여러 가지
유틸
kkkktrrr
03/02 16621 45
지난번에 만든 (케모노,히토미,X,유튜브 등등 downloader gallery-dl, yt-dlp 활용) 다운로더 GUI 버전으로 만들어봄
유틸
noname
03/01 16098 56
하츠네 미쿠 (코이카츠) 프리셋 공유
유틸
pst0025
02/28 13933 32
유니티 클뜯 assetstudio 후속 animestudio
유틸
xcandle
02/28 8920 19
Sizer.7z
유틸
ㅇㅇ
02/27 8194 13
RJ01279319 네토라레 히로인 백설 1.1 백로그등 편의성 개조 파일(패치파일만)
유틸
apelzl011
02/25 6794 13
Digital Contents Library Tool 1.1.7.2 (구 DLsite 퀵 뷰어)
유틸
ll-lllllllll
02/24 92545 70
시니시스타2 1.2.1 폭유 모드
유틸
무슨소리니
02/24 19105 39
어떤 여자 상사의 비밀 마사지 가게 ver.1.0.6 DRM 해제 실행파일
유틸
미스터장
02/23 10210 11
감금된 채 딥키스 여성주도~페라 포함~ 노모패치만
유틸
미스터장
02/23 7572 6
MZ 엔진 index 치트 유틸
유틸
전적노트
02/22 7514 4
[MySonar] 소수를 위한 오디오 플레이어
유틸
hustlyn
02/22 16965 77
RJ01389782 비밀 노출 마나카 커스텀 미션 번역
유틸
ㅇㅇ
02/21 13165 25
마메32 신버전
유틸
a123456789
02/21 40128 191
RJ 미리보기 서포트 (Tempermonkey 기반)
유틸
sss-com
02/21 7941 14
복호화 밑 품번 링크 생성기 사이트
유틸
vOwOv
02/20 9263 11
nursecall 치트
유틸
nekoplug
02/20 6936 5
26.04.18, 90일, 자동 줄바꿈) RJ01540816 ver.1.0.0 js (2).7z
유틸
ㅇㅇ
02/19 22810 13
RJ01438167 여동생과 함께살자 노모 Bepinex 파일
유틸
joaja
02/18 16066 24
시니시스타2 1.2.1 Slit(가터벨트) 아웃핏 노모 모드
유틸
tongpa
02/18 17825 12
수정 Agent17 0.26.6 cheat mod 버전+ 안티치트,추가치트
유틸
a123456789
02/17 15439 10
GameDB 2
유틸
심심한개발자
02/17 14110 8
Agent17 겨울동화 삽 강화 버그 픽스
유틸
AKGH
02/17 16653 13
[후타]pernio의 후타나리 시리즈 노모패치 모음
유틸
레가토
02/17 12036 12
렌파이 공용 치트엔진+agent17 치트 쓰는 법
유틸
high-hope
02/16 27403 38