Greasy Fork

Greasy Fork is available in English.

Tongji Chrome XUANKE 同济选课网正常化

使同济大学的选课网 xuanke.tongji.com 在 Chrome 内核的浏览器下正常运行

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name Tongji Chrome XUANKE 同济选课网正常化
// @namespace http://tampermonkey.net/
// @version 0.2
// @description 使同济大学的选课网 xuanke.tongji.com 在 Chrome 内核的浏览器下正常运行
// @author fs
// @match http://xuanke.tongji.edu.cn/*
// @grant none
// @run-at document-start
 
// ==/UserScript==
//无需输验证码,直接点登陆即可提交
window.onload=function(){
    navigator.family="gecko";
    document.getElementsByName("T3")[0].value="不用输了,直接点提交";
    f_submit=function(){document.getElementsByName("T3")[0].value="";document.form1.submit();return false; };
    /*if(window.topFramey){
        window.frames.detailfrm.document.body.onload=function(){window.frames.detailfrm.document.body.oncontextmenu=null;alert(window.frames.detailfrm.document.body.oncontextmenu);};
        window.frames.topFramey.document.body.onload=function(){window.frames.topFramey.document.body.oncontextmenu=null;alert(window.frames.detailfrm.document.body.oncontextmenu);};
        alert(window.topFramey);
    }*/
};

//骗过选课网脚本的浏览器检测,使其将浏览器检测为gecko,解决登陆选课网后左侧目录结构无法展开收起的问题
window.controllers=1;
Object.defineProperty(Object.getPrototypeOf(navigator),'appVersion',{get:function(){return '4.0 (Windows NT) AppleWebKit (KHTML, like Gecko) Chrome Safari';}});

//解决浏览器自动访问favicon.ico造成403自动登出的问题
ico=document.createElement("link");
ico.setAttribute("rel","shortcut icon");
ico.setAttribute("type","image/x-icon");
ico.setAttribute("href","data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
document.head.appendChild(ico);