Greasy Fork is available in English.

Discussions » Creation Requests

定做一个打某个网页,自动展开某个区域的脚本

§
Posted: 07.05.2023.

能做的大佬联系报个价,谢谢
V:Mateo_YOY

§
Posted: 07.05.2023.
Edited: 07.05.2023.
§
Posted: 08.05.2023.
// ==UserScript==
// @name               DEXTools_自动点击更多信息按钮
// @name:zh-CN         DEXTools_自动点击更多信息按钮
// @name:en-US         DEXTools_Auto click more info btn
// @description        在适当的时候自动点击更多信息按钮。
// @version            1.0.0
// @author             LiuliPack
// @license            WTFPL
// @namespace          https://gitlab.com/LiuliPack/UserScript
// @match              https://www.dextools.io/app/cn/ether/pair-explorer/*
// @run-at             document-body
// ==/UserScript==

'use strict';

// 定义快捷选素选择器($)变量,元素快捷选取($(元素定位符))函数
let $ = ele => document.querySelector(ele);

function $$(ele) {
    return new Promise(resolve => {
        if ($(ele)) {
            return resolve($(ele));
        }
        const observer = new MutationObserver(mutations => {
            if ($(ele)) {
                resolve($(ele));
                observer.disconnect();
            }
        });
        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
};



// 当趋势信息被展示时,就点击更多信息按钮
$$('.trading-view__container').then(ele => $('.section-container .more-info-button').click())
§
Posted: 08.05.2023.
Edited: 08.05.2023.
// ==UserScript==
// @name               DEXTools_自动点击更多信息按钮
// @name:zh-CN         DEXTools_自动点击更多信息按钮
// @name:en-US         DEXTools_Auto click more info btn
// @description        在适当的时候自动点击更多信息按钮。
// @version            1.0.1
// @author             LiuliPack
// @license            WTFPL
// @namespace          https://gitlab.com/LiuliPack/UserScript
// @include            https://www.dextools.io/app/[en|es|cn|es|ru|ar|hi]/ether/pair-explorer/*
// @run-at             document-body
// ==/UserScript==

'use strict';

// 定义快捷选素选择器($)变量,元素快捷选取($(元素定位符))函数
let $ = ele =document.querySelector(ele);

function $$(ele) {
    return new Promise(resolve ={
        if ($(ele)) {
            return resolve($(ele));
        }
        const observer = new MutationObserver(mutations ={
            if ($(ele)) {
                resolve($(ele));
                observer.disconnect();
            }
        });
        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
};

// 当趋势信息被展示时,就点击更多信息按钮
$$('.trading-view__container').then(ele => $('.section-container .more-info-button').click())
§
Posted: 02.09.2023.

老大,现在网页改版了,现在我安装好脚本后,打开网页并不能自动点击 more info
请求帮忙升级一下

https://www.dextools.io/app/en/bnb/pair-explorer/0x4b729d5d871057f3a9c424792729217cde72410d

感谢

// ==UserScript==
// @name               DEXTools_自动点击更多信息按钮
// @name:zh-CN         DEXTools_自动点击更多信息按钮
// @name:en-US         DEXTools_Auto click more info btn
// @description        在适当的时候自动点击更多信息按钮。
// @version            1.0.1
// @author             LiuliPack
// @license            WTFPL
// @namespace          https://gitlab.com/LiuliPack/UserScript
// @include            https://www.dextools.io/app/[en|es|cn|es|ru|ar|hi]/ether/pair-explorer/*
// @run-at             document-body
// ==/UserScript==

'use strict';

// 定义快捷选素选择器($)变量,元素快捷选取($(元素定位符))函数
let $ = ele =document.querySelector(ele);

function $$(ele) {
    return new Promise(resolve ={
        if ($(ele)) {
            return resolve($(ele));
        }
        const observer = new MutationObserver(mutations ={
            if ($(ele)) {
                resolve($(ele));
                observer.disconnect();
            }
        });
        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
};

// 当趋势信息被展示时,就点击更多信息按钮
$$('.trading-view__container').then(ele => $('.section-container .more-info-button').click())
§
Posted: 02.09.2023.

了解,但目前不方便制作、调整脚本。不急的话可以稍微等几天。

§
Posted: 02.09.2023.

好的,谢谢大哥,等您方便再调整

§
Posted: 10.09.2023.

了解,但目前不方便制作、调整脚本。不急的话可以稍微等几天。

大哥,这两天方面调整一下脚本吗,谢谢

§
Posted: 10.09.2023.
// ==UserScript==
// @name               DEXTools_自动点击更多信息按钮
// @name:zh-CN         DEXTools_自动点击更多信息按钮
// @name:en-US         DEXTools_Auto click more info btn
// @description        在适当的时候自动点击更多信息按钮。
// @version            1.0.2
// @author             LiuliPack
// @license            WTFPL
// @namespace          https://gitlab.com/LiuliPack/UserScript
// @match              https://www.dextools.io/app/en/ether/pair-explorer/*
// @match              https://www.dextools.io/app/es/ether/pair-explorer/*
// @match              https://www.dextools.io/app/cn/ether/pair-explorer/*
// @match              https://www.dextools.io/app/es/ether/pair-explorer/*
// @match              https://www.dextools.io/app/ru/ether/pair-explorer/*
// @match              https://www.dextools.io/app/ar/ether/pair-explorer/*
// @match              https://www.dextools.io/app/hi/ether/pair-explorer/*
// @run-at             document-body
// ==/UserScript==

'use strict';

// 定义快捷选素选择器($)变量,元素快捷选取($(元素定位符))函数
let $ = ele => document.querySelector(ele);

function $$(ele) {
    return new Promise(resolve => {
        if ($(ele)) {
            return resolve($(ele));
        }
        const observer = new MutationObserver(mutations => {
            if ($(ele)) {
                resolve($(ele));
                observer.disconnect();
            }
        });
        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
};

// 当趋势信息被展示时,就点击更多信息按钮
$$('.trading-view__container').then(ele => $('.section-container .more-info-button').click())

// @include匹配网页失效了,而且之前得代码好像本来就不能运行。

§
Posted: 10.09.2023.

新版扩展插件程序接口(Manifest v3)不兼容// @include所以就失效了,而且之前得代码好像本来就不能运行。

§
Posted: 13.09.2023.

新版扩展插件程序接口(Manifest v3)不兼容// @include所以就失效了,而且之前得代码好像本来就不能运行。

现在可以了,谢谢大哥,谢谢大哥

§
Posted: 01.11.2023.

新版扩展插件程序接口(Manifest v3)不兼容// @include所以就失效了,而且之前得代码好像本来就不能运行。

老大,网页好像又升级了,会出现点开后再缩回去的情况,譬如连续打开十个网页,13579正常打开,246810会在刚加载时打开,当加载完k线后它又缩回去。

求帮忙升级一下

§
Posted: 02.11.2023.
Edited: 02.11.2023.

老大,网页好像又升级了,会出现点开后再缩回去的情况,譬如连续打开十个网页,13579正常打开,246810会在刚加载时打开,当加载完k线后它又缩回去。

求帮忙升级一下

// ==UserScript==
// @name               DEXTools_自动点击更多信息按钮
// @name:zh-CN         DEXTools_自动点击更多信息按钮
// @name:en-US         DEXTools_Auto click more info btn
// @description        在适当的时候自动点击更多信息按钮。
// @version            1.0.3-hotfix
// @author             LiuliPack
// @license            WTFPL
// @namespace          https://gitlab.com/LiuliPack/UserScript
// @match              https://www.dextools.io/app/en/ether/pair-explorer/*
// @match              https://www.dextools.io/app/es/ether/pair-explorer/*
// @match              https://www.dextools.io/app/cn/ether/pair-explorer/*
// @match              https://www.dextools.io/app/es/ether/pair-explorer/*
// @match              https://www.dextools.io/app/ru/ether/pair-explorer/*
// @match              https://www.dextools.io/app/ar/ether/pair-explorer/*
// @match              https://www.dextools.io/app/hi/ether/pair-explorer/*
// @run-at             document-body
// ==/UserScript==

'use strict';

// 定义快捷选素选择器($)变量,元素快捷选取($(元素定位符))函数
let $ = ele => document.querySelector(ele);

function $$(ele) {
    return new Promise(resolve => {
        if ($(ele)) {
            return resolve($(ele));
        }
        const observer = new MutationObserver(mutations => {
            if ($(ele)) {
                resolve($(ele));
                observer.disconnect();
            }
        });
        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
};

// 当趋势信息被展示、左侧信息栏未展开时,就点击更多信息按钮
$$('.trading-view__container').then(ele => {
    if($('.left-container > div .mt-0').textContent === ' More info ') {
        $('.section-container .more-info-button').click()
    }
})
§
Posted: 02.11.2023.

老大,网页好像又升级了,会出现点开后再缩回去的情况,譬如连续打开十个网页,13579正常打开,246810会在刚加载时打开,当加载完k线后它又缩回去。

求帮忙升级一下

// ==UserScript==
// @name               DEXTools_自动点击更多信息按钮
// @name:zh-CN         DEXTools_自动点击更多信息按钮
// @name:en-US         DEXTools_Auto click more info btn
// @description        在适当的时候自动点击更多信息按钮。
// @version            1.0.3-hotfix
// @author             LiuliPack
// @license            WTFPL
// @namespace          https://gitlab.com/LiuliPack/UserScript
// @match              https://www.dextools.io/app/en/ether/pair-explorer/*
// @match              https://www.dextools.io/app/es/ether/pair-explorer/*
// @match              https://www.dextools.io/app/cn/ether/pair-explorer/*
// @match              https://www.dextools.io/app/es/ether/pair-explorer/*
// @match              https://www.dextools.io/app/ru/ether/pair-explorer/*
// @match              https://www.dextools.io/app/ar/ether/pair-explorer/*
// @match              https://www.dextools.io/app/hi/ether/pair-explorer/*
// @run-at             document-body
// ==/UserScript==

'use strict';

// 定义快捷选素选择器($)变量,元素快捷选取($(元素定位符))函数
let $ = ele => document.querySelector(ele);

function $$(ele) {
    return new Promise(resolve => {
        if ($(ele)) {
            return resolve($(ele));
        }
        const observer = new MutationObserver(mutations => {
            if ($(ele)) {
                resolve($(ele));
                observer.disconnect();
            }
        });
        observer.observe(document.body, {
            childList: true,
            subtree: true
        });
    });
};

// 当趋势信息被展示、左侧信息栏未展开时,就点击更多信息按钮
$$('.trading-view__container').then(ele => {
    if($('.left-container > div .mt-0').textContent === ' More info ') {
        $('.section-container .more-info-button').click()
    }
})

谢谢老大,可以了

Post reply

Sign in to post a reply.