您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
pchome search title bar
- // ==UserScript==
- // @name pchome_search_title_filter
- // @namespace http://mesak.tw
- // @version 1.1
- // @description pchome search title bar
- // @author Mesak
- // @match https://ecshweb.pchome.com.tw/search/*
- // @icon https://www.google.com/s2/favicons?sz=64&domain=pchome.com.tw
- // @grant none
- // @license MIT
- // ==/UserScript==
- (function() {
- 'use strict';
- $('#layoutBread').css({justifyContent:'space-between'});
- $('#layoutBread').append(`<div style="width:40%">標題搜尋:<input type="text" id="fix_title_filter" value="" style="border:1px #000 solid"></div>`).on('keypress blur','#fix_title_filter',(e)=>{
- let word = e.currentTarget.value
- let words = word.split(' ')
- let $productList = $('#ItemContainer > dl')
- if( word == '')
- {
- $productList.show();
- }else{
- $productList.hide();
- $productList.each((key,node)=>{
- let title = $('.prod_name',node).text()
- let resutls = []
- words.forEach( (value) => {
- resutls.push( title.toLowerCase().search(value.toLowerCase()) !== -1)
- })
- if( !resutls.includes(false) ){
- $(node).show();
- }
- })
- }
- })
- // Your code here...
- })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址