Skip to content

Instantly share code, notes, and snippets.

@IanSmith123
Last active November 28, 2022 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save IanSmith123/0f34c40043976ad5aa32d03fdd64e5b1 to your computer and use it in GitHub Desktop.
Save IanSmith123/0f34c40043976ad5aa32d03fdd64e5b1 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