갤러리 뷰 3열로 보기 스크립트
// ==UserScript==
// @name Kone 갤러리 3열 + 큰 썸네일
// @namespace https://kone.gg/
// @version 1.1
// @description Kone 갤러리 뷰를 3열로 변경하고 썸네일을 크게 표시
// @match https://kone.gg/s/*
// @run-at document-idle
// @grant GM_addStyle
// ==/UserScript==
(function () {
'use strict';
GM_addStyle(`
/*
* 갤러리 카드 내부 이미지가 카드 폭에 맞게 커지도록 보정
*/
a.group\\/article img {
width: 100% !important;
height: auto !important;
object-fit: cover !important;
}
/*
* 제목/정보 영역이 카드 폭을 정상 사용하도록 보정
*/
a.group\\/article {
width: 100% !important;
max-width: none !important;
}
`);
function applyGalleryLayout() {
const grids = document.querySelectorAll('div.grid');
grids.forEach(grid => {
const className = grid.className?.toString() ?? '';
/*
* 실제 사이트에서 쓰는 클래스:
* grid-cols-[repeat(auto-fill,minmax(10rem,1fr))]
*/
const isGalleryGrid =
className.includes('grid-cols-[repeat(auto-fill,minmax(10rem,1fr))]') ||
grid.querySelector('a.group\\/article[href*="/s/"]');
if (!isGalleryGrid) return;
const articleLinks = grid.querySelectorAll('a.group\\/article[href*="/s/"]');
// 게시글 카드가 여러 개 있는 영역만 갤러리로 판단
if (articleLinks.length < 3) return;
grid.style.setProperty(
'grid-template-columns',
'repeat(3, minmax(0, 1fr))',
'important'
);
grid.style.setProperty('gap', '1.25rem', 'important');
grid.style.setProperty('justify-items', 'stretch', 'important');
articleLinks.forEach(link => {
link.style.setProperty('width', '100%', 'important');
link.style.setProperty('max-width', 'none', 'important');
});
});
}
applyGalleryLayout();
/*
* Kone이 화면을 다시 그리는 경우가 있어서 변화 감지 후 재적용
*/
const observer = new MutationObserver(() => {
applyGalleryLayout();
});
observer.observe(document.body, {
childList: true,
subtree: true
});
})();
6열은 너무 작아보여서 3열로 쓰는데
코네 레이아웃 바뀌어서 GPT한테 바꿔달라해서 수리함
일단은 잘 되는듯?
s/somisoft
• 157,564 subscribers- 1. 게시물 규정 양식
업로드 시 링크 암호화 & 필수 정보를 기입할 것
- 2. 질문
국룰, 암호화 링크 등 기본사항 질문 금지, 탭 미준수시 차단 및 삭제
- 3. 요청
요청 기준 및 양식 미준수 & 댓글로만 자료 복구 요청 시 차단
- 4. 미성년자 / 근첩 / 페미 / 다중계정
조금이라도 의심되면 선 차단, 후 해명
- 5. 좆목 / 네임드화
닉언, 네임드화 등 친목질 금지
- 6. 분탕 및 어그로 / 혐짤 / 낚시 / 뇌절
해당 카테고리의 차단 기간 및 가중처벌은 처리자 재량으로 판단
- 7. 홍보 / 판촉 / 거래
허용되지 않은 모든 형태의 홍보, 거래, 교환, 조건부 공유 시 차단
- 8. 쌀먹 / 바이러스
조건부 공유 & 수익성 링크 & 고의적인 바이러스 유포 시 갱신차단
- 9. 자료 분류 / AI
미검수 시 표기 필수, 생성형 AI를 사용한 자료의 제목에 AI 미기입 시 차단
- 10. 실사 / 토들러
업로드시 갱신 차단
- 11. 기타 세부 규정은 서브 공지사항 참고