Greasy Fork is available in English.

Google Deep Search Jumper

Jump to any Google results page via simple input (clean UI, no clutter)

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         Google Deep Search Jumper 
// @namespace    https://openweb-tools.example
// @version      2.0
// @description  Jump to any Google results page via simple input (clean UI, no clutter)
// @match        https://www.google.*/*
// @grant        none
// @license      GPL-3.0-or-later
// @run-at       document-idle
// ==/UserScript==

/*
GNU GPL v3
https://www.gnu.org/licenses/gpl-3.0.html
*/

(function () {
    'use strict';

    if (!location.href.includes("/search")) return;
    if (document.getElementById("gdsj-box")) return;

    const params = new URLSearchParams(location.search);
    const query = params.get("q");

    if (!query) return;

    function goToPage(page) {
        if (!page || page < 1) return;

        const start = (page - 1) * 10;
        const url = new URL(location.href);

        url.searchParams.set("start", start);
        url.searchParams.set("q", query);

        location.href = url.toString();
    }

    // UI
    const box = document.createElement("div");
    box.id = "gdsj-box";

    box.style = `
        position: fixed;
        bottom: 20px;
        right: 20px;
        z-index: 999999;
        background: rgba(0,0,0,0.85);
        color: #0f0;
        padding: 10px;
        border-radius: 10px;
        font-family: monospace;
        font-size: 12px;
        box-shadow: 0 0 10px rgba(0,0,0,0.5);
    `;

    box.innerHTML = `
        <div style="margin-bottom:5px;">Jump page</div>
        <input id="gdsj-input" type="number" min="1" placeholder="#" style="width:60px;">
        <button id="gdsj-go">Go</button>
    `;

    document.body.appendChild(box);

    document.getElementById("gdsj-go").onclick = () => {
        const page = parseInt(document.getElementById("gdsj-input").value);
        goToPage(page);
    };

    // Enter key support
    document.getElementById("gdsj-input").addEventListener("keydown", (e) => {
        if (e.key === "Enter") {
            const page = parseInt(e.target.value);
            goToPage(page);
        }
    });

})();