DexFilterTool

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

当前为 2024-03-27 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 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);
    }
})();