ChatGPT conversation Seeker ORIGINAL

Search past conversations

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         ChatGPT conversation Seeker ORIGINAL
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Search past conversations
// @author       Emree.el on instagram :)
// @match        https://chatgpt.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // Create a container for the search bar and button
    const searchBarContainer = document.createElement('div');
    searchBarContainer.style.position = 'fixed';
    searchBarContainer.style.top = '0';
    searchBarContainer.style.left = 'calc(50% + 280px)';
    searchBarContainer.style.transform = 'translateX(-50%)';
    searchBarContainer.style.zIndex = '9999';
    searchBarContainer.style.background = '#171717';
    searchBarContainer.style.padding = '5px';
    searchBarContainer.style.boxShadow = '0 2px 4px rgba(0,0,0,0.1)';
    searchBarContainer.style.display = 'flex';
    searchBarContainer.style.alignItems = 'center';

    // Create the search input
    const searchInput = document.createElement('input');
    searchInput.type = 'text';
    searchInput.placeholder = 'Enter text to search';
    searchInput.style.marginRight = '5px';
    searchInput.style.padding = '5px';
    searchInput.style.fontSize = '14px'; // Make font size a bit smaller
    searchInput.style.backgroundColor = 'black';


    // Create the search button
    const searchButton = document.createElement('button');
    searchButton.textContent = 'Enter';
    searchButton.style.padding = '5px';
    searchButton.style.fontSize = '14px'; // Make font size a bit smaller

    // Append the input and button to the container
    searchBarContainer.appendChild(searchInput);
    searchBarContainer.appendChild(searchButton);

    // Append the container to the body
    document.body.appendChild(searchBarContainer);

    // Add event listener to the button
    searchButton.addEventListener('click', function() {
        const searchText = searchInput.value.trim().toLowerCase();
        const elements = document.querySelectorAll('a.flex.items-center.gap-2.p-2');

        elements.forEach(element => {
            const text = element.textContent.trim().toLowerCase();
            if (text.includes(searchText)) {
                element.style.display = 'block';
            } else {
                element.style.display = 'none';
            }
        });
    });
})();