kone
소미소프트

소미소프트

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

09/06/2025, 08:00:40
유틸
4411 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개
영상
브레머튼
05/08 20327 79
[AI][패치만] RJ01549336 알미오시온의 의술사 ver 1.044
번역
lovesccubus
05/08 68080 309
[국산 우리 농수간물]수간 커미션 모음집
야짤
412343
05/08 14671 68
ai, 찢) 이블린과 휴일에 데이트 후 잔뜩 연인섹스 했다
야짤
kjh9304
05/08 12796 121
[구매보급] [버전업] RJ01491971 마을의 간판녀가 권력자의 눈에 띄게 되는 이야기 26.05.07
미번
gkqisq
05/08 14170 44
[AI번역-노모 풀컬러] Master Works + Master Piece[수정]
동인
mybest
05/08 39034 163
[AI번역-♥개추♥][Okayusan] ★지금까지 가장 좋았던 섹스★(노모)
동인
mybest
05/08 26813 82
[미번/번역요청]NymPri_Alpha_080h[님포](5월 패치) 적용
미번
우욿
05/07 10982 26
[RJ01042589]사막 왕국과 노예 사냥 V3.1.0 (현재 메인스토리 완료까지 멈춤 수정 )
번역
sawsd
05/07 39479 125
(노모화) [Shiwasu No Okina] '에로♡삐삐' 단행본 완료 [Decensored]
동인
xbox
05/07 15696 85
[나의 히어로 아카데미아](재업) 랙돌x데쿠 + 서비스 신(청소) + 화질 up
영상
Ghost
05/07 22488 159
[RJ01575169/이미지번역/기게번역] 가출 딸, 주웠습니다. (2026.05.07)
번역
candle
05/07 87791 397
[버전업 알림] 이케부쿠로 섹스로이드 학원 v1.3.1
번역
jaaxmaster
05/07 50945 203
[요청복구] 236799 그녀가 노예가 된 이유 - 여도적실피와잠들지않는섬 -
복구
VoTaeBe
05/07 34758 60
[Asani nemuru]부모님이 심취한 노출교에 강제 입교당한 소녀
동인
요요코코
05/07 36809 65
[구매보급]NO라고 말할 수 없는 무방비 JK와 농후한 씨받이 연인 섹스
소리
이름뭐하지
05/07 14905 48
[번역](ahemaru) - 하이엘프 여왕과 공주가 성범죄자를 응징한다. 라는 내용의 만화
동인
핥는맛
05/07 33005 189
[미번/구매보급] 绯月仙行录 비월선행록 간체자 V1.287 버그수정본
미번
흑토끼
05/07 30698 101
[일부90일]요청복구 5게 +최신화 완료+
복구
Ghost
05/07 54925 111
(명조) 히유키
영상
브레머튼
05/07 17078 112
수나 (ZZZ)
영상
브레머튼
05/07 17848 101
RJ01037663) 서큐버스 장군의 병력 증산소
복구
양겜소믈리에
05/07 28678 80
[Liyoosa]불법 카지노에서 정체가 탄로나 조교당하는 여주인공
동인
요요코코
05/07 42573 171
[ai번역] 발기부전 밖에 태어나지 않는 섬에서 유일한 절륜 2
동인
yaoino
05/07 31121 56
[복구] 신데렐라(니케) 복구 영상
영상
브레머튼
05/07 17381 56
[구매 보급] RJ01485652 終末のオルターエゴイズム
미번
salrami5752
05/07 9762 30
[요청복구][게임녹화]리본 아일랜드
영상
komet52
05/07 22825 41
AI, 셀레스포니아) 유리 캡슐 구속 (촉수, 보테배 주의)
야짤
miso5
05/07 18981 86
[AI번역][Tachi Iyashi] Maso Mesu Happy Acme (decensored)
동인
mybest
05/07 27297 92
점장인데도 소악마 알바 전속 자지가 되어버렸습니다. CV. 야나기 히토미
소리
maruran
05/07 7232 55