Skip to content

Instantly share code, notes, and snippets.

@shelllee
Forked from IanSmith123/ucas-course-console.js
Created November 28, 2022 11:31
Show Gist options
  • Save shelllee/59cdc356f01fa7b6e46d289684f2b4b1 to your computer and use it in GitHub Desktop.
Save shelllee/59cdc356f01fa7b6e46d289684f2b4b1 to your computer and use it in GitHub Desktop.
ucas课程网站
// ==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