GooeyN / gmgn 扫链隐藏刚发币

// ==UserScript==
// @name         gmgn 扫链隐藏刚发币
// @namespace    http://tampermonkey.net/
// @version      2025-01-24
// @description  try to take over the world!
// @author       You
// @match        https://gmgn.ai/meme/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=gmgn.ai
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
  'use strict';

  setTimeout(function () {
    // 创建一个新的按钮元素
    const button = document.createElement('button');
    button.textContent = '隐藏刚发币';
    button.style.cssText = 'background-color: #4CAF50; color: white; padding: 10px 15px; border: none; border-radius: 5px; cursor: pointer; font-size: 14px; margin: 10px 0;';

    // 添加点击事件监听器
    button.addEventListener('click', function () {
      const sideRight = document.querySelector('.css-1q9048m') || document.querySelector('.css-8exz1p'); // 刚发币一栏

      if (sideRight && sideRight.style.display !== 'none') {
        sideRight.style.display = 'none';
      }
      else {
        sideRight.style.display = 'block';
      }
    });

    // 获取 .side-right 元素
    const sideRight = document.querySelector('.css-1s7jjv2'); // 顶栏右上角

    // 检查 .side-right 是否存在
    if (sideRight) {
      // 将按钮插入到 .side-right 元素的最前面
      sideRight.insertBefore(button, sideRight.firstChild);
    }
    else {
      console.error('未找到 .side-right 元素');
    }

  }, 1500); // 1500 毫秒后执行
})();