您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Change out all the links that go to the Stream tab to the Classwork tab, except the Stream tab button
// ==UserScript== // @name Blow up Stream in Google Classroom // @description Change out all the links that go to the Stream tab to the Classwork tab, except the Stream tab button // @match https://classroom.google.com/* // @namespace test // @version 1.2 // @grant none // @license MIT // ==/UserScript== const target = document.body const observer = new MutationObserver(function(mutations) { mutations.forEach(function(mutation) { const links = document.getElementsByTagName('a'); const regexFull = /\/u\/1\/c\/(.*)$/i; for (var i = 0; i < links.length; i++) { if (links[i].href.includes("details")) { continue } if (links[i].getAttribute("tabindex") == "-1" || links[i].getAttribute("data-focus-id")?.length > -1) { links[i].href = links[i].href.replace(regexFull, '/u/1/w/$1/t/all'); } } }); }); const config = { childList: true, subtree: true, }; observer.observe(target, config);
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址