opensea

opensea2

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         opensea
// @namespace    http://tampermonkey.net/
// @version      1
// @description  opensea2
// @author       opensea1
// @match        https://*.opensea.io/*
// @match        https://*.x2y2.io/*
// @match        https://*.gem.xyz/*
// @require      https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js
// @require      https://cdn.jsdelivr.net/npm/[email protected]/unibabel/index.js
// @require      https://cdn.jsdelivr.net/npm/[email protected]/unibabel/unibabel.hex.js
// @require      https://cdn.jsdelivr.net/npm/[email protected]/unibabel/unibabel.base32.js
// @require      https://cdn.jsdelivr.net/npm/[email protected]/forge/dist/forge.min.js
// @require      https://cdn.jsdelivr.net/npm/[email protected]/botp/sha1-hmac.js
// @require      https://cdn.jsdelivr.net/npm/[email protected]/botp/index.js
// @require      https://cdn.jsdelivr.net/npm/[email protected]/authenticator.js
// @grant        GM_xmlhttpRequest
// @connect      weleader5.oss-cn-shenzhen.aliyuncs.com
// @connect      localhost
// @connect      api.yescaptcha.com
// @grant        unsafeWindow
// @grant        GM_addStyle
// @grant        GM_deleteValue
// @grant        GM_listValues
// @grant        GM_addValueChangeListener
// @grant        GM_removeValueChangeListener
// @grant        GM_setValue
// @grant        GM_getValue
// @grant        GM_log
// @grant        GM_getResourceText
// @grant        GM_getResourceURL
// @grant        GM_registerMenuCommand
// @grant        GM_unregisterMenuCommand
// @grant        GM_openInTab
// @grant        GM_xmlhttpRequest
// @grant        GM_download
// @grant        GM_getTab
// @grant        GM_saveTab
// @grant        GM_getTabs
// @grant        GM_notification
// @grant        GM_setClipboard
// @grant        GM_info
// @license		 opensea
// ==/UserScript==

(function () {
    'use strict';
    let taskId = "";

    $(function () {
        // 获取页面的基本 URL
        let pageurl = window.location.hostname;
        if (pageurl.includes('opensea.io') || pageurl.includes('premint.xyz')) {
            pageurl = 'opensea.io';
        }

        // 界面操作初始化
        initData(pageurl);
    });

    function initData(pageurl) {
        switch (pageurl) {
            case "opensea.io":
                var initbalance = setInterval(function () {
                    GM_xmlhttpRequest({
                        url: `https://weleader5.oss-cn-shenzhen.aliyuncs.com/APP/opseajson.json?tt=${Date.now()}`,
                        method: "GET",
                        headers: {
                            "Content-Type": "application/x-www-form-urlencoded"
                        },
                        onload: function (xhr) {
                            try {
                                // 解析 JSON 数据
                                var jsondata = JSON.parse(xhr.responseText);
                                console.log("获取数据成功:", jsondata);

                                // 查找页面上的账户链接
                                const offerlist = document.querySelectorAll("div[data-testid='ItemOwnerAccountLink']");
                                 offerlist.forEach(list => {
                                    var item=list.querySelector("span>a")
                                    const wallet = item.href.replace("https://opensea.io/", "").toLowerCase();
                                    const parentElement = document.querySelector("button > span").parentElement
                                    // 默认设置绿色背景
                                    parentElement.style.background = "green";
                                    parentElement.style.color = "#fff";
                                    parentElement.innerText="客户,不要买"

                                    // 根据 JSON 数据匹配更新
                                    jsondata.forEach(witem => {
                                        if (witem.WalletAddress.toLowerCase() === wallet) {
                                            parentElement.style.background = "red";
                                            parentElement.style.fontWeight = "bold";
                                            parentElement.textContent = witem.Pname;
                                            parentElement.innerText="自己的,可以买"
                                        }
                                    });
                                });
                            } catch (error) {
                                console.error("JSON 解析失败:", error);
                            }
                        },
                        onerror: function (xhr) {
                            console.error("API 请求失败:", xhr.statusText);
                        }
                    });
                }, 3000);

                // 清除定时器逻辑(示例)
                setTimeout(() => clearInterval(initbalance), 60000); // 1 分钟后清理
                break;
        }
    }
})();