您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
打开自选基金页面自动打开'多图同列'
// ==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" }); } };