kone
소미소프트

소미소프트

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

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

AI) 자기전에 실험해 본 것
야짤
miso5
04/23 28359 43
[liyoosa]싫은 표정으로 성처리를 해주는 간호사 0
야짤
요요코코
04/23 13866 55
[구매보급]츤데레인 우리집 여동생은 귀찮은 게 귀엽다.~어? 뭔가 상태가 이상해... 으에엑⁉ 사랑 무거워에엑이에엑이에
소리
이름뭐하지
04/23 23206 72
악동 NTR 보고, 승부욕 강한 아내가 긴 성기에 패배, 남편을 배신하고 오호음 임신교미
소리
키리안
04/23 28399 129
ZGxhbGRu 모음 나머지 한달
영상
raime
04/23 39098 103
[구매보급][번역요청]성기사 실비아와 음욕의 저주
미번
마카라이트
04/23 29399 60
연희몽상 ai한패 완성했음
작업현황
알탕
04/23 15754 23
[구매보급][번역요청] 던전 러너
미번
마카라이트
04/23 20912 30
[미번/번역요청] クロネのとなり 체험판
미번
nakota
04/23 16193 34
ZGxhbGRu 1탄 기한 한달
영상
raime
04/23 33019 102
[구매보급/번역요청] RJ01588884 イノセント・ドーター(링크수정)
미번
gre0204
04/23 19186 70
AI) 셀레스포니아 아마네 학교 축제에서 스트립 댄스? (00시 53분 기준 장면 추가됨)
야짤
miso5
04/23 14140 116
Daily Lives My Countryside 퀘스트 손번역 (진행 40%)
번역
감자떡사요
04/23 41318 310
NTR물 좋아하는 나로써는 핵띵작 25일에 나오네
정보
뫼에엥
04/23 26388 18
(노모) [Nakamachi Machi] 버니 메리지 대작전
동인
04/23 42119 175
hmv모음 재업
영상
롯데리아알바0831
04/23 33661 109
[렌파이, 손번역] NewHorizon-0.4-pc
번역
65410
04/23 42923 224
[구매보급]저음 감미로운 목소리의 집사는 더러운자지에 미쳐버린 저속한 성처리암컷
소리
이름뭐하지
04/23 20007 63
AI) 수업시간에 스마트폰을 보여주는 무표정쨩
야짤
miso5
04/23 13065 97
bmFqYXI 2020~2026모음
영상
karatro
04/23 39529 170
[직번][Masaki(Team Sazandora)] 참교육x순애 암컷타락 냉소적인 페미를 암컷타락 시켜 봅시다
동인
qlkjrnd
04/23 62064 182
AI) 무표정짱과 블랙 매지션 걸 코스플레이
야짤
miso5
04/23 16007 132
(구매보급)(미번)ドキドキ!セクハラ健康診断
Mock
04/23 33619 38
AI) 무표정쨩 버스 안에서 섹스 안 했음 짤
야짤
miso5
04/23 19976 84
RJ01589123 건방진 AVtuber가 탱글탱글한 L컵으로 유혹해온다 (3D 영상 포함)
소리
argoklarke
04/23 17392 72
손번역-고학력(인텔리) 유부녀 아마미야 토코 준교수(선생님)의 발정 _안경X
동인
fhfhfghdr453
04/23 56745 266
3.98 GB, 90일, 개따묶+미번) RJ297120 마법소녀 셀레스포니아 1.23 개조 따거 묶음.7z + RJ297120 Magical Girl Celesphonia 1.24 순정 미번.7z
복구
ㅇㅇ
04/23 35829 103
개껄리는데 번역 안된거 (kanroame)
동인
posan
04/23 22722 43
[미번][구매보급][보이스코믹] rim 이 세계는 누군가에게 조작되고 있다
소리
ㅇㅇ
04/23 19505 51
AI) 셀레스포니아 기계구속 세뇌
야짤
miso5
04/23 12582 135