您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
17.07.2024, 19:01:59
// ==UserScript== // @name Photon Link on Solscan.io // @namespace Violentmonkey Scripts // @match https://solscan.io/account/* // @grant none // @version 1.0 // @author - // @license MIT // @description 17.07.2024, 19:01:59 // ==/UserScript== const sleep = (ms) => new Promise(res => setTimeout(res, ms)) async function init() { while(true) { const isBalanceChangeTabActive = document.querySelector('[data-state="active"][id*=balanceChanges]'); if (isBalanceChangeTabActive) { applyLinks() } await sleep(1000); } } init(); function applyLinks() { const tableRows = document.querySelectorAll('tbody > tr'); for (const row of tableRows) { const token = row.querySelector('[href*="/token/"]')?.getAttribute('href').replace('/token/',''); if (!token) continue; const linkToPhoton = row.querySelector('a.photon'); if (linkToPhoton) continue; const lastColumn = row.querySelector('td:last-child'); let child = document.createElement('div'); child.innerHTML = `<a class="photon text-link border-transparent ml-1" target="_blank" href="https://photon-sol.tinyastro.io/en/lp/${token}">| Photon</a>`; child = child.firstChild; lastColumn.appendChild(child) } }