opensea

opensea2

  1. // ==UserScript==
  2. // @name opensea
  3. // @namespace http://tampermonkey.net/
  4. // @version 1
  5. // @description opensea2
  6. // @author opensea1
  7. // @match https://*.opensea.io/*
  8. // @match https://*.x2y2.io/*
  9. // @match https://*.gem.xyz/*
  10. // @require https://cdn.jsdelivr.net/npm/jquery@3.7.1/dist/jquery.min.js
  11. // @require https://cdn.jsdelivr.net/npm/clshuangcool@3.0.0/unibabel/index.js
  12. // @require https://cdn.jsdelivr.net/npm/clshuangcool@3.0.0/unibabel/unibabel.hex.js
  13. // @require https://cdn.jsdelivr.net/npm/clshuangcool@3.0.0/unibabel/unibabel.base32.js
  14. // @require https://cdn.jsdelivr.net/npm/clshuangcool@3.0.0/forge/dist/forge.min.js
  15. // @require https://cdn.jsdelivr.net/npm/clshuangcool@3.0.0/botp/sha1-hmac.js
  16. // @require https://cdn.jsdelivr.net/npm/clshuangcool@3.0.0/botp/index.js
  17. // @require https://cdn.jsdelivr.net/npm/clshuangcool@3.0.0/authenticator.js
  18. // @grant GM_xmlhttpRequest
  19. // @connect weleader5.oss-cn-shenzhen.aliyuncs.com
  20. // @connect localhost
  21. // @connect api.yescaptcha.com
  22. // @grant unsafeWindow
  23. // @grant GM_addStyle
  24. // @grant GM_deleteValue
  25. // @grant GM_listValues
  26. // @grant GM_addValueChangeListener
  27. // @grant GM_removeValueChangeListener
  28. // @grant GM_setValue
  29. // @grant GM_getValue
  30. // @grant GM_log
  31. // @grant GM_getResourceText
  32. // @grant GM_getResourceURL
  33. // @grant GM_registerMenuCommand
  34. // @grant GM_unregisterMenuCommand
  35. // @grant GM_openInTab
  36. // @grant GM_xmlhttpRequest
  37. // @grant GM_download
  38. // @grant GM_getTab
  39. // @grant GM_saveTab
  40. // @grant GM_getTabs
  41. // @grant GM_notification
  42. // @grant GM_setClipboard
  43. // @grant GM_info
  44. // @license opensea
  45. // ==/UserScript==
  46.  
  47. (function () {
  48. 'use strict';
  49. let taskId = "";
  50.  
  51. $(function () {
  52. // 获取页面的基本 URL
  53. let pageurl = window.location.hostname;
  54. if (pageurl.includes('opensea.io') || pageurl.includes('premint.xyz')) {
  55. pageurl = 'opensea.io';
  56. }
  57.  
  58. // 界面操作初始化
  59. initData(pageurl);
  60. });
  61.  
  62. function initData(pageurl) {
  63. switch (pageurl) {
  64. case "opensea.io":
  65. var initbalance = setInterval(function () {
  66. GM_xmlhttpRequest({
  67. url: `https://weleader5.oss-cn-shenzhen.aliyuncs.com/APP/opseajson.json?tt=${Date.now()}`,
  68. method: "GET",
  69. headers: {
  70. "Content-Type": "application/x-www-form-urlencoded"
  71. },
  72. onload: function (xhr) {
  73. try {
  74. // 解析 JSON 数据
  75. var jsondata = JSON.parse(xhr.responseText);
  76. console.log("获取数据成功:", jsondata);
  77.  
  78. // 查找页面上的账户链接
  79. const offerlist = document.querySelectorAll("div[data-testid='ItemOwnerAccountLink']");
  80. offerlist.forEach(list => {
  81. var item=list.querySelector("span>a")
  82. const wallet = item.href.replace("https://opensea.io/", "").toLowerCase();
  83. const parentElement = document.querySelector("button > span").parentElement
  84. // 默认设置绿色背景
  85. parentElement.style.background = "green";
  86. parentElement.style.color = "#fff";
  87. parentElement.innerText="客户,不要买"
  88.  
  89. // 根据 JSON 数据匹配更新
  90. jsondata.forEach(witem => {
  91. if (witem.WalletAddress.toLowerCase() === wallet) {
  92. parentElement.style.background = "red";
  93. parentElement.style.fontWeight = "bold";
  94. parentElement.textContent = witem.Pname;
  95. parentElement.innerText="自己的,可以买"
  96. }
  97. });
  98. });
  99. } catch (error) {
  100. console.error("JSON 解析失败:", error);
  101. }
  102. },
  103. onerror: function (xhr) {
  104. console.error("API 请求失败:", xhr.statusText);
  105. }
  106. });
  107. }, 3000);
  108.  
  109. // 清除定时器逻辑(示例)
  110. setTimeout(() => clearInterval(initbalance), 60000); // 1 分钟后清理
  111. break;
  112. }
  113. }
  114. })();