diff --git a/js/pjw-core.js b/js/pjw-core.js index d8a67da..72f8954 100644 --- a/js/pjw-core.js +++ b/js/pjw-core.js @@ -1,40 +1,3 @@ -var modes_reg = { - course: /grablessons.do/i, // 选课系统列表 - xk_system: /\/\/xk.nju.edu.cn/i, // 选课系统 xk.nju.edu.cn 界面 - - major_course: /student\/elective\/specialityCourseList.do/i, // 专业选课 - union: /student\/elective\/index.do/i, // 选课 - gym: /gymClassList.do/i, // 体育补选 - read: /readRenewCourseList.do/i, // 经典导读读书班补选 - dis: /discussRenewCourseList/i, // 导学、研讨、通识课补选 - public: /publicRenewCourseList/i, // 公选课补选 - open: /openRenewCourse/i, // 跨专业补选 - art: /artRenewCourseList/i, // 美育补选 - common: /commonCourseRenewList|commonRenew.do/i, // 通修课补选 - - read_view: /elective\/readCourseList.do/i, // 经典导读读书班初选 - dis_view: /elective\/freshman_discuss.do/i, // 导学、研讨、通识课初选 - art_view: /elective\/artList.do/i, // 美育初选 - public_view: /elective\/publicCourseList.do/i, // 公选课初选 - open_view: /elective\/open.do/i, // 跨专业初选 - - course_eval: /evalcourse\/courseEval.do\?method=currentEvalCourse/i, // 课程评估 - - all_course_list: /teachinginfo\/allCourseList.do\?method=getTermAcademy/i, // 全校课程 - grade_info: /student\/studentinfo\/achievementinfo.do\?method=searchTermList/i, // 成绩查看 - course_info: /courseList.do\?method=getCourseInfoM/i, // 课程详细信息 - - main_page: /(\/jiaowu\/student\/index.do|\/jiaowu\/login.do)/i, // 主页 - login_page: /(\/jiaowu\/exit.do|\/jiaowu$|\/jiaowu\/$|\/jiaowu\/index.jsp)/i // 登录页 -} -window.pjw_mode = ""; -for (const mode_name in modes_reg) { - if (modes_reg[mode_name].test(window.location.href) == true) { - window.pjw_mode = mode_name; - break; - } -} - window.potatojw_intl = function() { if (typeof(window.pjw_version) == "string") return; diff --git a/manifest-v2.json b/manifest-v2.json new file mode 100644 index 0000000..911f473 --- /dev/null +++ b/manifest-v2.json @@ -0,0 +1,29 @@ +{ + "manifest_version": 2, + "name": "PotatoPlus", + "version": "0.3.4", + "description": "Potato Overflow! NJU土豆改善工程", + "icons": { + "96": "img/logo96.png", + "128": "img/logo128.png", + "512": "img/logo512.png", + "1024": "img/logo1024.png" + }, + "author": "Limos", + "content_scripts": [ + { + "matches": ["*://*.nju.edu.cn/jiaowu*", "*://xk.nju.edu.cn/*"], + "css": ["css/material-components-web.min.css", "css/pjw.css", "css/pjw-classlist.css", "css/pjw-filter.css", "css/pjw-console.css"], + "js": ["js/inject.js"], + "run_at": "document_start", + "all_frames": true + } + ], + "web_accessible_resources": ["js/*","css/*","fonts/*"], + "browser_specific_settings": { + "gecko": { + "update_url": "https://github.com/cubiccm/potatoplus/releases/latest/download/updates.json" + } + } +} +