kone
소미소프트

소미소프트

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

09/06/2025, 08:00:40
유틸
4352 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.

청아) 로리페도를 죽이는 마법
동인
와캬퍄헉농
05/01 42359 99
섹프선배
동인
hatlatal
05/01 11962 22
빨간 건 너의 잘못
동인
hatlatal
05/01 13785 38
3Mura 0501
영상
참새
05/01 23248 104
번역요청) 天空花嫁_천공의 신부 DQV NTR 게임
미번
난관공략
05/01 10634 24
[미번/번역요청] 최면 애플리케이션 실험 기록3
동인
비밀세상
05/01 11456 23
[복구]【보너스 만화 포함】 잘생긴 여고생 여성 집사의 푹신한 페로몬 로커【저음 끈적끈적】
소리
키도
05/01 7824 40
PTNTR-왕도 최강의 성검사에게 파티 멤버를 네토라레 당하고 강○멈춤 마조 오나 조교당하는 허접검사의 말로-
소리
키도
05/01 10838 47
[4K] 미네타 VS 마운트 레이디 ~쓰레기 히어로, 욕망 폭식♥~
영상
실루엣21
05/01 24888 143
【네토라레 망상 엣지】소꿉친구 여친와 해, 주시지 않겠습니까?
소리
키도
05/01 14257 43
【네토라레 망상 에로】마법소녀쨩, 타락하지말아줘!
소리
키도
05/01 9172 30
사랑하는 연하 어린 아내를 프로 NTR사에게 네토라세 하는 이야기
소리
키도
05/01 6901 35
자지 밀크 퓨~~ 우♡ 달콤하고 심술궂은 에로가슴 누나에게, 실컷 사정하는 이야기♡
소리
키리안
05/01 10763 76
【NTR/오호】Re:마조 하이스펙 청초 아내의 과격한 봉사 보고~야리서클 시절의 과거 남자들에게 재조교당해 천박한 육변기로 타락 ~
소리
키도
05/01 8419 44
【네토라레 망상 엣지】전속 메이드씨, 봉사하러 가지 마!
소리
키도
05/01 8057 31
네토라레 보고를 하는 아내는 네토라레 플레이를 그만둘 수 없다 ~ 인생의 승자 남편이 패배 인생 쪽의 거근에게 아내를 빼앗겨서 ~【도S 취향/KU100】
소리
키도
05/01 13195 31
정치 관계없이 걍 역대 병신 JOAT 3대장
일반
미스터장
05/01 8082 64
~탁란+사정 관리에 의한 극한 NTR 생활~ 알파메일에 의한 정자 제공으로 마음까지 네토라레 당하는 사랑하는 아내: 치사 편
소리
키도
05/01 16054 35
【성실계 NTR】내 여친이 불량 야리친의 네토라레 오나호 보지가 될 때까지【KU100】
소리
키도
05/01 9797 37
[ACT][액션][노모] Atelier Tia ver.1.01 (티아의 아틀리에)
미번
Kai
05/01 11104 55
【네토라레보고】 치어리더 여친의 네토라레를 보면서 우울 발기 자지로 딸치는 남자친구【KU100】
소리
키도
05/01 6891 37
NTR 최면학원
동인
hatlatal
05/01 32010 63
보?추 이렐리아를 착정하는 아칼리
영상
ㅇㅇ
05/01 24702 83
[요청복구] RJ01482488 에로 파워로 도도한 딜러를 굴복시켜라!
복구
argoklarke
05/01 40595 83
술친구랑!
동인
hatlatal
05/01 29901 123
후타) 난 코이카츠가 참 안 꼴린다고 생각했어요
야짤
harangrang
05/01 6927 19
기번,미검수) 퇴마 우키요초시
번역
ikadran
05/01 26831 91
호놀룰루를 함락시키는 책
동인
hatlatal
05/01 9859 20
【NTR】신혼 아내의 네토라레 보고를 귀청소 ~ 믿고 시댁에 보냈던 아내가 아버지에게 ‘신부수업’이라며 범해지고 돌아왔다
소리
키도
05/01 8499 41
[구매보급] (자체한글)(보추주의) 크레타군의 용돈 대작전!
이빨요정남편
05/01 23009 30