kone
소미소프트

소미소프트

코네 이미지 뷰어 개선 스크립트

09/06/2025, 08:00:40
유틸
4271 views · 10 likes

코네 자체 이미지 뷰어에 전체화면이 없어서 간단하게 AI 사용해서 만들어봤음

이미지 완전 전체화면 + 마우스(한손)으로 모든 조작 or 키보드로 조작 가능


사용법:

0. Tampermonkey 확장프로그램 설치 후, + 버튼으로 아래 내용 복붙


1. 이미지 클릭해서 기존처럼 뷰어열기

2. 우상단 전체화면 버튼 or 키보드 I키 누르기로 전체화면

1

3. 우상단 X버튼 클릭 or I키로 전체화면 및 이미지뷰어 탈출

1


방향키, 마우스 휠로 이미지 이동 가능


aHR0cHM6Ly9raW8uYWMvYy9kMml2bk1FR25EUTV6X3RQcWpoUEti



코드 보기
// ==UserScript==
// @name         Kone.gg 뷰어 확장 기능
// @namespace    https://kone.gg/
// @version      1.9
// @description  'i' 키/버튼으로 뷰어/전체화면 제어, 전체화면 나가기 버튼으로 뷰어 동시 닫기, 이미지 전환 애니메이션 제거 기능을 제공합니다.
// @author       AI Assistant & User
// @match        https://kone.gg/*
// @grant        GM_addStyle
// @run-at       document-idle
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    const SCRIPT_ID = 'konegg-ui-toggle-script';

    // === 스타일 주입 ===
    GM_addStyle(`
        /* UI 숨김 스타일 */
        .viewer-container.ui-hidden .viewer-header,
        .viewer-container.ui-hidden .viewer-footer {
            display: none !important;
        }

        /* Swiper 뷰어 슬라이드 애니메이션 제거 */
        .swiper-wrapper {
            transition-duration: 0.001s !important;
        }

        /* 전체화면 나가기 버튼 스타일 */
        #exit-fullscreen-button {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 2147483647;
            display: none;
            width: 48px;
            height: 48px;
            background-color: rgba(0, 0, 0, 0.4);
            color: white;
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 50%;
            cursor: pointer;
            align-items: center;
            justify-content: center;
        }
        #exit-fullscreen-button:hover {
            background-color: rgba(0, 0, 0, 0.7);
        }
    `);

    // === 기능 함수 ===
    const toggleUI = (container) => {
        if (container) {
            container.classList.toggle('ui-hidden');
        }
    };

    const setupViewer = (viewerContainer) => {
        if (viewerContainer.dataset.uiToggleSetup === 'true') return;
        viewerContainer.dataset.uiToggleSetup = 'true';
        viewerContainer.classList.add('viewer-container');

        const header = viewerContainer.querySelector('div.flex.w-full.justify-end');
        if (!header) return;

        header.classList.add('viewer-header');
        const footer = viewerContainer.querySelector('div.flex.flex-col.md\\:flex-row');
        if (footer) footer.classList.add('viewer-footer');

        // 전체화면 버튼 추가 (이미 있다면 추가하지 않음)
        if (!header.querySelector('.fullscreen-btn')) {
            const closeButton = header.querySelector('button:last-child');
            if (closeButton) {
                const fullscreenButton = document.createElement('button');
                fullscreenButton.className = `${closeButton.className} fullscreen-btn`;
                fullscreenButton.innerHTML = ``;
                fullscreenButton.onclick = (e) => {
                    e.stopPropagation();
                    if (!document.fullscreenElement) {
                        document.documentElement.requestFullscreen();
                    }
                };
                header.insertBefore(fullscreenButton, closeButton);
            }
        }

        // UI 토글 버튼 이벤트 설정
        const gridButton = header.querySelector('button');
        if (gridButton && !gridButton.dataset.uiToggleEvent) {
             gridButton.dataset.uiToggleEvent = 'true';
             gridButton.addEventListener('click', (e) => {
                e.preventDefault();
                e.stopPropagation();
                toggleUI(viewerContainer);
            }, true);
        }
    };

    // === 스크립트 초기 실행 로직 ===
    if (document.getElementById(SCRIPT_ID)) return;

    const scriptMarker = document.createElement('div');
    scriptMarker.id = SCRIPT_ID;
    scriptMarker.style.display = 'none';
    document.body.appendChild(scriptMarker);

    if (!document.getElementById('exit-fullscreen-button')) {
        const exitFullscreenButton = document.createElement('button');
        exitFullscreenButton.id = 'exit-fullscreen-button';
        exitFullscreenButton.innerHTML = ``;

        // [수정됨] 'X' 버튼 클릭 시 전체화면 해제 및 뷰어 닫기
        exitFullscreenButton.onclick = () => {
            if (document.fullscreenElement) {
                // 1. 전체화면 해제
                document.exitFullscreen();

                // 2. 뷰어를 찾아 닫기 버튼을 클릭
                const viewer = document.querySelector('.viewer-container');
                if (viewer) {
                    const closeButton = viewer.querySelector('.viewer-header button:last-child');
                    if (closeButton) {
                        closeButton.click();
                    }
                }
            }
        };
        document.body.appendChild(exitFullscreenButton);
    }


    // === 이벤트 리스너 ===
    const observer = new MutationObserver((mutationsList) => {
        for (const mutation of mutationsList) {
            if (mutation.addedNodes.length) {
                const viewerContainer = document.querySelector('div.fixed.z-50 div.swiper')?.closest('div.fixed.z-50');
                if (viewerContainer) {
                    setupViewer(viewerContainer);
                }
            }
        }
    });

    document.addEventListener('keydown', (e) => {
        const activeElement = document.activeElement;
        const isTyping = activeElement && (activeElement.tagName === 'INPUT' || activeElement.tagName === 'TEXTAREA' || activeElement.isContentEditable);
        if (isTyping) return;

        if (e.key.toLowerCase() === 'i') {
            e.preventDefault();
            const viewer = document.querySelector('.viewer-container:not([style*="display: none"])');

            if (viewer) { // 뷰어가 열려있을 때
                if (document.fullscreenElement) {
                    document.exitFullscreen();
                    const closeButton = viewer.querySelector('.viewer-header button:last-child');
                    if (closeButton) closeButton.click();
                } else {
                    document.documentElement.requestFullscreen();
                }
            } else { // 뷰어가 닫혀있을 때
                 const openViewerButton = Array.from(document.querySelectorAll('div[role="menuitem"]'))
                                             .find(item => item.textContent.trim() === '뷰어 열기');
                if (openViewerButton) {
                    openViewerButton.click();
                    setTimeout(() => {
                         if (!document.fullscreenElement) {
                             document.documentElement.requestFullscreen().catch(err => {});
                         }
                    }, 100);
                }
            }
        }
    });

    document.addEventListener('fullscreenchange', () => {
        const currentViewer = document.querySelector('.viewer-container');
        const exitBtn = document.getElementById('exit-fullscreen-button');

        if (document.fullscreenElement) {
            if (currentViewer) currentViewer.classList.add('ui-hidden');
            if (exitBtn) exitBtn.style.display = 'flex';
        } else {
            if (currentViewer) currentViewer.classList.remove('ui-hidden');
            if (exitBtn) exitBtn.style.display = 'none';
        }
    });

    observer.observe(document.body, {
        childList: true,
        subtree: true
    });
})();




10
12 comments
09/06/25
09/06/25
모바일은 확장 프로그램 못쓰는게 슬플 따름...
09/06/25 Edited 09/06/25
모바일도 안드로이드 쓰면 확프나 유저스크립트 쓸 수 있어!
04/27 Edited 04/27

Deleted comment.

04/27 Edited 04/27

Deleted comment.

04/27 Edited 04/27

Deleted comment.

미번) 남친 있는 거유 알바 갸루와 실컷 섹스한 이야기3
동인
kjalar
05/24 9494 20
[미번][이종간][촉수][변형] 감염기록(RJ376909), If.(RJ01075511)
미번
roomonfire
05/24 8716 20
[언어없음] Ero-Electric Dreams ver.25.06.29
미번
미스터장
05/24 11556 33
[미번] 갓 딴 임신시키기 좋은 날 ver.1.1c (26.05.20)
미번
미스터장
05/24 8298 40
[미번] 이 풍속점에 서큐버스는 필요 없다 ~No succubus Wanted~
미번
미스터장
05/24 9570 28
구매보급) 【한국어판】 여동생이 나를 반찬삼아 자위하고 있었던 이야기
동인
GOOD
05/24 22508 66
자체한글 - 뒷계 까발린다! 러브호텔로 와라! 체험판 V2
번역
kkkkkk0909
05/24 31825 103
[미번] 01568399 patimon 마법학교 여학생의 고난…♡ ~소환수 슬라임에게 젖꼭지를 자극당하며 신음소리를 내며 연속 절정♡~ 모션 애니메이션
영상
ctf5r4edfyfdr4r4
05/24 24338 148
[Mogg] 처음하는 부활동
동인
ed123
05/24 12416 22
[후원/임신/출산/수간]GeulimYKUN - MAKIMA x HORSE IMPREGNATION
동인
bidurgi09
05/24 20115 81
[보급] RJ01558276 아크메시아 ~하렘 임신시키기 사냥꾼 생활~ [RPG Developer Bakin엔진]
미번
kkkkkk0909
05/24 13868 82
레이더 폭도들에게 공격당한 대공동 6과
영상
브레머튼
05/24 21276 109
[구매보급][번역요청][스캇] RJ148219 LAND OF THE FREE
미번
oo
05/24 6944 19
[요청복구]RJ01395769 기홍사 스칼렛~전설의 약초를 찾아~ver.1.05
복구
oo
05/24 19973 47
[복구] (RJ354108) 비타민퀘스트2 경량화(용량줄인) 업스케일링 판 (용량 대폭 할인! 48G >> 6.5G)
복구
sinbiru
05/24 21201 143
SKETCHY MASSAGE 추가 업데이트 진행사항안내
정보
kkkkkk0909
05/24 7130 27
[복구] 최면어플에 당한 의현 사부님 복구 영상
영상
브레머튼
05/24 18580 94
[구매보급][번역요청][버전업]RJ01521598)NAKED HIGHSCHOOL【学園生活露出RPG】
미번
냐냐퍄퍄
05/24 8044 36
[구매보급]추방된 현자의 성 인체 실험 ~연속 절정 어둠 마법 쾌락 연구~
소리
이름뭐하지
05/24 8722 59
와이즈 & 미야비 & 야나기
영상
브레머튼
05/24 13718 90
구매보급) 한국어판】 처음 하는 백합 섹스
동인
GOOD
05/24 12948 52
[요청복구?] 寅乃檻 써클 2개
복구
oo
05/24 19732 49
직번[Tourendou (Tonagi Tsuyu)]원나잇으로 끝나게 하지 않아 ~소꿉친구와 재회해서 연인이 되는 이야기~
동인
woo15
05/24 21905 117
데니아 (명조)
영상
브레머튼
05/24 15907 100
[요청복구] RJ201837 알프스와 위험한 숲 (KR, 노모)
복구
vhskorea
05/24 13555 49
촉수)유혈) 개인적으로 생각하는 촉수물 하이라이트
야짤
roomonfire
05/24 8757 28
ai) 오늘의 야짤
야짤
ai0098
05/24 7049 26
[후속편] 갱뱅 섹스 중에 최면이 풀려버린 의현 영상 (ZZZ)
영상
브레머튼
05/24 26046 148
[구매보급][번역요청][스캇] RJ098572 H -HARD CORE-
미번
oo
05/24 8798 21
직번]doji ro)처녀가 동정과의 첫 체험에서 눈을 뜨는 이야기 4
동인
woo15
05/24 24967 140