Greasy Fork

来自缓存

Greasy Fork is available in English.

天天基金多图同列

打开自选基金页面自动打开'多图同列'

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

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

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

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

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

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @icon         http://fund.eastmoney.com/favicon.ico
// @name         天天基金多图同列
// @namespace    *
// @version      0.1
// @description  打开自选基金页面自动打开'多图同列'
// @author       `Entropy Fund 0xEaa13@201021 [email protected]
// @match        http*://favor.fund.eastmoney.com/*
// @grant        none
// @requir       https://code.jquery.com/jquery-latest.js
// ==/UserScript==


//打开自选基金页面自动打开'多图同列'
window.onload=function(){
   'use strict';
    //检查是否有该项目(是不是此页面)
    console.log(document.getElementsByClassName('em-tabs em-tabs-title em-myfavor-type')[0].children[1].children[1]);
    if (document.getElementsByClassName('em-tabs em-tabs-title em-myfavor-type').length>0){
        //模拟点击"多图同列"
        document.getElementsByClassName('em-tabs em-tabs-title em-myfavor-type')[0].children[1].children[1].click();
        //document.body.scrollTop = document.documentElement.scrollTop = -100;
        //获取当前滚动条行号
        console.log(document.documentElement.scrollTop);

        //窗口滚动到指定位置
        window.scrollTo({
            top: 530,
            behavior: "smooth"
        });



        }

};