-
-
Save shelllee/59cdc356f01fa7b6e46d289684f2b4b1 to your computer and use it in GitHub Desktop.
ucas课程网站
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name ucas-course-console-helper | |
// @namespace https://les1ie.com/ | |
// @version 0.2 | |
// @description 去除中国科学院大学课程网站对进入控制台的限制 | |
// @author Les1ie | |
// @match https://course.ucas.ac.cn/portal/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
document.oncontextmenu = true // 允许右键 | |
// 允许通过快捷键进入控制台 | |
document.onkeydown = document.onkeyup = document.onkeypress = function(event) { | |
var e = event || window.event || arguments.callee.caller.arguments[0]; | |
if (e && e.keyCode == 123) { | |
e.returnValue = false; | |
return (false); | |
}else if((e.ctrlKey)&&(e.shiftKey)&&(e.keyCode==73)){ | |
e.returnValue = false; | |
return (false); | |
}else if((e.ctrlKey)&&(e.keyCode==85)){//追加 | |
e.returnValue = false; | |
return (false); | |
} | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment