From 035c661cc21528b11140ef50b0865961b0ed7996 Mon Sep 17 00:00:00 2001 From: zhangzuwei <40817217+zhangzuwei@users.noreply.github.com> Date: Fri, 27 Mar 2026 16:26:33 +0800 Subject: [PATCH] Search Enhancement Optimizations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 优化搜索增强中,顶栏搜索栏在宽屏窗口下两边仍有较为明显空白处,把部分 1fr 改为 auto 使其能够自适应各种窗口宽度下自动调整铺满顶栏保证美观性 2. 搜索增强”里面,精简并强化功能代码整体性 2. 适度为顶栏搜索中的“4. 搜索条件”筛查收藏数的子功能添加视觉效果,这比单纯无任何效果的筛选框要美观一点 --- "Pixiv \345\242\236\345\274\272.user.js" | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git "a/Pixiv \345\242\236\345\274\272.user.js" "b/Pixiv \345\242\236\345\274\272.user.js" index 9e43728..09a6594 100644 --- "a/Pixiv \345\242\236\345\274\272.user.js" +++ "b/Pixiv \345\242\236\345\274\272.user.js" @@ -322,15 +322,15 @@ jQuery($ => { const isNewVersion = $form.find('div.charcoal-text-field-root').length > 0; // 2.2 根据上面的判断来应用哪套布局:真,走适配新版本样式。假,走适配老版本样式 if (isNewVersion) { - $form.parent().parent().css({ 'grid-template-columns': '1fr 1fr 1fr 1fr 1fr 1fr 1fr', 'gap': '10px' }); + $form.parent().parent().css({ 'grid-template-columns': 'auto auto auto 1fr auto auto', 'gap': '10px', 'width': '100%', 'align-items': 'center'}); } else { $form.parent().parent().css('grid-template-columns', '1fr minmax(0px, 219px) minmax(0px, 219px) minmax(0px, 538px) minmax(0px, 538px) minmax(0px, 219px) 2fr'); } - $form.parent().parent().parent().css('grid-template-columns', '1fr 2fr 1fr'); + $form.parent().parent().parent().css('grid-template-columns', 'auto 1fr auto'); // 设置官方原生搜索框的最小宽度 const $formInput = $form.find('input[type="text"]:first'); - $formInput.css('min-width', '120px'); + $formInput.css('min-width', '115px'); // 3. 搜索UID,PID和作者 const initSearch = option => { @@ -386,8 +386,8 @@ jQuery($ => { if(features.searchFavourite.isEnable()) { const $input = $form.find('input[type="text"]:first'); const $select = $(` - +