site:検索 h

Execute UserScript

目前為 2025-04-03 提交的版本,檢視 最新版本

// ==UserScript==
// @name        site:検索 h
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Execute UserScript
// @author       Your Name
// @include      https://
// @grant       none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    
    document.addEventListener('keydown', (e) => {
        
                if (e.key === 'h') {
                    javascript:(function() {        const popup = document.createElement('div');        popup.style.position = 'fixed';        popup.style.top = '50%';        popup.style.left = '50%';        popup.style.transform = 'translate(-50%, -50%)';        popup.style.width = '250px';        popup.style.padding = '20px';        popup.style.background = '#f4f4f4';        popup.style.color = '#333';        popup.style.border = '2px solid #888';        popup.style.borderRadius = '10px';        popup.style.boxShadow = '0 0 10px rgba(0,0,0,0.2)';        popup.style.fontFamily = 'Arial, sans-serif';        popup.style.zIndex = '10000';        const closeButton = document.createElement('span');        closeButton.textContent = '☒';        closeButton.style.position = 'absolute';        closeButton.style.top = '10px';        closeButton.style.right = '10px';        closeButton.style.cursor = 'pointer';        closeButton.onclick = () => document.body.removeChild(popup);        popup.appendChild(closeButton);const sites = [   { name: "モモンガ", url: "site:momon-ga.com" },   { name: "ヒトミラ", url: "site:hitomi.la" },   { name: "ケモノ", url: "site:kemono.su" },   { name: "ダンボール", url: "site:danbooru.donmai.us" },   { name: "MissAV", url: "site:missav.ws" },   { name: "ZOZOアニメ", url: "site:zozovideo.com" },   { name: "原神GameWith", url: "site:gamewith.jp" },   { name: "原神wiki", url: "site:wikiwiki.jp" },   { name: "gsmarena", url: "site:gsmarena.com" },   { name: "ガルマックス", url: "site:garumax.com" },   { name: "the比較", url: "site:thehikaku.net" },   { name: "モバイルドットコム", url: "site:mobile-com.ne.jp" } ];        const checkboxes = sites.map(site => {                const label = document.createElement('label');                const checkbox = document.createElement('input');                checkbox.type = 'checkbox';                checkbox.value = site.url;                label.appendChild(checkbox);                label.appendChild(document.createTextNode(site.name));                popup.appendChild(label);                popup.appendChild(document.createElement('br'));                return checkbox;        });        const searchBox = document.createElement('input');        searchBox.type = 'text';        searchBox.placeholder = '検索キーワード';        searchBox.style.width = '100%';        searchBox.style.marginTop = '10px';        searchBox.style.padding = '5px';        popup.appendChild(searchBox);        const searchButton = document.createElement('button');        searchButton.textContent = '検索';        searchButton.style.position = 'absolute';        searchButton.style.right = '10px';        searchButton.style.bottom = '10px';        searchButton.style.padding = '5px';        searchButton.style.cursor = 'pointer';        searchButton.onclick = function() {                const selectedSites = checkboxes                        .filter(checkbox => checkbox.checked)                        .map(checkbox => checkbox.value);                if (selectedSites.length > 0 && searchBox.value) {                        const query = selectedSites.join(' OR ') + ' ' + searchBox.value;                        window.open('https://www.google.com/search?q=' + encodeURIComponent(query));                } else {                        alert('少なくとも1つのサイトを選択し、検索キーワードを入力してください。');                }        };        popup.appendChild(searchButton);        document.body.appendChild(popup);})();
                }
            
    });
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址