DexFilterTool

一个监测交易数据的工具插件

目前為 2024-03-27 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         DexFilterTool
// @namespace    http://www.seallon.com/
// @version      1.0
// @description  一个监测交易数据的工具插件
// @author       RaoXinLong
// @match        https://www.dextools.io/*
// @match        https://photon-sol.tinyastro.io/*
// @grant        none
// @require      https://unpkg.com/[email protected]/dist/ajaxhook.min.js
// @require      https://code.jquery.com/jquery-2.1.4.min.js
// @license      MPL-2.0
// ==/UserScript==

(function() {
    'use strict';
    var configDom;
    function InitConfig(){
        var configDom = document.createElement('div');
        configDom.innerHTML = '';
        configDom.style.cssText="max-width:60%;min-width: 200px;padding:0 14px;height: 40px;color: rgb(255, 255, 255);line-height: 40px;text-align: center;border-radius: 4px;position: fixed;top: 10%;left: 90%;transform: translate(-50%, -50%);z-index: 999999;background: rgba(0, 0, 0,.7);font-size: 16px;";
        document.body.appendChild(configDom);
    }
    function Toast(msg,duration){
        duration=isNaN(duration)?3000:duration;
        var m = document.createElement('div');
        m.innerHTML = msg;
        m.style.cssText="max-width:60%;min-width: 200px;padding:0 14px;height: 40px;color: rgb(255, 255, 255);line-height: 40px;text-align: center;border-radius: 4px;position: fixed;top: 10%;left: 90%;transform: translate(-50%, -50%);z-index: 999999;background: rgba(0, 0, 0,.7);font-size: 16px;";
        document.body.appendChild(m);
        setTimeout(function() {
            var d = 0.5;
            m.style.webkitTransition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
            m.style.opacity = '0';
            setTimeout(function() { document.body.removeChild(m) }, d * 1000);
        }, duration);
    }
    Toast("插件启动成功!!");
    var hostname = location.hostname;
    if(hostname =='www.dextools.io')
    {
        Toast(hostname);
    }else if(hostname =='photon-sol.tinyastro.io')
    {
        //Toast(hostname);
        setTimeout(function () {
            var items = $('.c-trades-table__scroll .c-grid-table__body');
            $(items[0]).on("DOMSubtreeModified", function() {
                var list = $(items[0]).find(".c-grid-table__tr");
                for(var i=0;i<10;i++)
                {
                    var childrenObj = $(list[i]).children("*");
                    var totalU = $(childrenObj[3]).html().replace("$","");
                    if(totalU.indexOf("K")<0){
                        var floatU = parseFloat(totalU);
                        if(floatU<500){
                            $(list[i]).remove();
                        }else{
                            $(childrenObj[3]).attr("style","font-size:22px;");
                        }
                    }else{
                        $(childrenObj[3]).attr("style","font-size:22px;");
                    }

                }
                Toast("插件监测中...");
            });
        }, 1000);
    }
})();