您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
This is an example for Machine Metrics reports, to automatically set the desired report view, hide the graph, expand two machines, and to reload the page on an interval.
当前为
// ==UserScript== // @name Machinemetrics Reports on load click today drop down // @namespace https://app.machinemetrics.com/ // @version 0.11 // @description This is an example for Machine Metrics reports, to automatically set the desired report view, hide the graph, expand two machines, and to reload the page on an interval. // @require https://cdnjs.cloudflare.com/ajax/libs/jquery/3.0.0-alpha1/jquery.js // @author rickzabel // @match https://app.machinemetrics.com/app/reports/builder?id=3056 // @grant none // @license MIT // @run-at document-start // ==/UserScript== (function() { const myInterval = setInterval(myTimer, 3000); const myInterval2 = setInterval(myTimer2, 3000); function myTimer() { var x = document.querySelector('.SelectBase__MenuItem-sc-1p5n5sa-7'); if (x != null) { //call function to stop timer myStopFunction() //click the dropdown for the desired date range document.querySelector('#today.SelectBase__MenuItem-sc-1p5n5sa-7').click(); //document.querySelector('#last-2-days.SelectBase__MenuItem-sc-1p5n5sa-7').click(); //document.querySelector('#last-month.SelectBase__MenuItem-sc-1p5n5sa-7').click(); } } function myStopFunction() { clearInterval(myInterval); } function myTimer2() { var x2 = document.querySelector('#table-row-undefined div div .Cells__EntityText-sc-1o23ezk-3.bIOdKK'); if (x2 != null) { //stop timer myStopFunction2() } //Hide the chart document.querySelector('#hide-chart').click(); //expand first shift document.querySelector("#table-row-undefined div div .Cells__EntityText-sc-1o23ezk-3.bIOdKK").click(); //expand 2nd shift document.querySelector("#table-row-undefined ~ div div div .Cells__EntityText-sc-1o23ezk-3.bIOdKK").click(); } function myStopFunction2() { clearInterval(myInterval2); } //reload ever 24 hours //setTimeout(MyReload, 86400); //clear reload parge and cache function MyReload(){ // location.reload(true) } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址