您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Automatically reconnect to Colab's session without clicking button.
当前为
// ==UserScript== // @name Google Colab Auto Reconnector // @namespace http://tampermonkey.net/ // @version 1.0 // @description Automatically reconnect to Colab's session without clicking button. // @author PartMent // @match https://colab.research.google.com/* // @match http://colab.research.google.com/* // @match https://*.research.google.com/* // @match http://*.research.google.com/* // @license MIT // @grant none // ==/UserScript== var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; if (MutationObserver) console.log('Auto reconnector is enabled.'); var ok = document.getElementById('ok'); var observer = new MutationObserver(function(mutations) { console.log('Detected DOM changes.'); setTimeout(function () { var ok = document.getElementById('ok'); if(ok.textContent.includes("連接") || ok.textContent.includes("连接") || ok.textContent.includes("Connect") || ok.textContent.includes("connect") || ok.textContent.includes("CONNECT")) { console.log('reconnecting...'); ok.click(); console.log('Connected'); } }, 3000); }); observer.observe(document.body, {childList: true});
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址