发现中也放大
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// ==UserScript==
|
||||
// @name Chaturbate 缩略图放大 2 倍
|
||||
// @namespace https://chaturbate.com/
|
||||
// @version 0.3.2
|
||||
// @version 0.3.5
|
||||
// @description 通过放大 grid 最小列宽来放大房间列表缩略图,保留原站填满行为
|
||||
// @match https://chaturbate.com/*
|
||||
// @match https://*.chaturbate.com/*
|
||||
@@ -15,12 +15,17 @@
|
||||
// ========== 配置项 ==========
|
||||
// 最小列宽倍数(原站约 174px / 180px,乘以该倍数后作为新的 minmax 最小值,1fr 仍填满整行)
|
||||
const SCALE = 2;
|
||||
// Discover 轮播容器高度倍数(< SCALE 可减少空白,文字区未等比放大)
|
||||
const CONTAINER_HEIGHT_SCALE = 1.75;
|
||||
// ===========================
|
||||
|
||||
const MIN_COL_MAIN = 174; // #main 下的 min
|
||||
const MIN_COL_ROOT = 180; // #roomlist_root、频道页下方(180×101) 的 min
|
||||
const minMain = Math.round(MIN_COL_MAIN * SCALE);
|
||||
const minRoot = Math.round(MIN_COL_ROOT * SCALE);
|
||||
// Discover 原高:triple 550/534, double 366/350, single 182/166
|
||||
const h = (ul, arrow) => ({ ul: Math.round(ul * CONTAINER_HEIGHT_SCALE), arrow: Math.round(arrow * CONTAINER_HEIGHT_SCALE) });
|
||||
const triple = h(550, 534), double = h(366, 350), single = h(182, 166);
|
||||
|
||||
const style = document.createElement("style");
|
||||
style.id = "tm-thumb-scale-style";
|
||||
@@ -85,6 +90,52 @@
|
||||
height: auto !important;
|
||||
display: block !important;
|
||||
}
|
||||
/* Discover 页:轮播缩略图 + 容器高度(CONTAINER_HEIGHT_SCALE 倍,默认 1.75) */
|
||||
.carousel-root .triple-rows ul.list,
|
||||
#discover_root .triple-rows ul.list {
|
||||
height: ${triple.ul}px !important;
|
||||
}
|
||||
.carousel-root .triple-rows .carousel-arrow-container,
|
||||
#discover_root .triple-rows .carousel-arrow-container {
|
||||
height: ${triple.arrow}px !important;
|
||||
}
|
||||
.carousel-root .double-rows ul.list,
|
||||
#discover_root .double-rows ul.list {
|
||||
height: ${double.ul}px !important;
|
||||
}
|
||||
.carousel-root .double-rows .carousel-arrow-container,
|
||||
#discover_root .double-rows .carousel-arrow-container {
|
||||
height: ${double.arrow}px !important;
|
||||
}
|
||||
.carousel-root .single-row ul.list,
|
||||
#discover_root .single-row ul.list {
|
||||
height: ${single.ul}px !important;
|
||||
}
|
||||
.carousel-root .single-row .carousel-arrow-container,
|
||||
#discover_root .single-row .carousel-arrow-container {
|
||||
height: ${single.arrow}px !important;
|
||||
}
|
||||
.carousel-root .room-list-carousel ul.list > li,
|
||||
#discover_root .room-list-carousel ul.list > li {
|
||||
width: ${minRoot}px !important;
|
||||
min-width: ${minRoot}px !important;
|
||||
max-width: ${minRoot}px !important;
|
||||
flex: 0 0 ${minRoot}px !important;
|
||||
}
|
||||
.carousel-root .room-list-carousel .room_thumbnail_container,
|
||||
#discover_root .room-list-carousel .room_thumbnail_container {
|
||||
display: block !important;
|
||||
width: 100% !important;
|
||||
}
|
||||
.carousel-root .room-list-carousel .room_thumbnail_container img,
|
||||
.carousel-root .room-list-carousel .room_thumbnail,
|
||||
#discover_root .room-list-carousel .room_thumbnail_container img,
|
||||
#discover_root .room-list-carousel .room_thumbnail {
|
||||
width: 100% !important;
|
||||
height: auto !important;
|
||||
display: block !important;
|
||||
max-width: none !important;
|
||||
}
|
||||
`;
|
||||
|
||||
const inject = () => {
|
||||
|
||||
Reference in New Issue
Block a user