您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
开始学习直接跳转到学习页,不用二次中转
当前为
// ==UserScript== // @name 专业技术人员学习新干线 // @namespace https://learning.hzrs.hangzhou.gov.cn // @version 2025-06-24 // @description 开始学习直接跳转到学习页,不用二次中转 // @author NetFert // @match https://learning.hzrs.hangzhou.gov.cn/* // @grant none // @license MIT // ==/UserScript== (function() { 'use strict'; const load=()=>{ fetch("https://learning.hzrs.hangzhou.gov.cn/api/index/Course/index", { "headers": { "accept": "application/json, text/plain, */*", "authorization": "Bearer "+localStorage.getItem("front_token"), "cache-control": "no-cache", "content-type": "application/json", "pragma": "no-cache", "sec-fetch-dest": "empty", "sec-fetch-mode": "cors", "sec-fetch-site": "same-origin" }, "referrer": "https://learning.hzrs.hangzhou.gov.cn/", "referrerPolicy": "strict-origin-when-cross-origin", "body": "{\"limit\":10,\"page\":1}", "method": "POST", "mode": "cors", "credentials": "include" }).then((response) => response.json()) .then((res) => { const tbodyChildren = document.getElementsByTagName("tbody")[0].children; for (let i = 0; i < tbodyChildren.length; i++) { const childElement = tbodyChildren[i]; childElement.childNodes[4].children[0].children[0].children[0].addEventListener('click', function(e) { e.stopPropagation(); e.preventDefault(); window.open("https://learning.hzrs.hangzhou.gov.cn/#/class?courseId="+res.data.data[i].courseid+"&coursetitle="+res.data.data[i].coursename) }, true); } })} window.addEventListener('load', function() { if (window.location.hash.includes('#/learn')) { load(); } }); })();