-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
117 additions
and
38 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
v0.3.0 2019-05-27 | ||
1. 教务系统改版修复 | ||
2. 增加油猴脚本 | ||
|
||
v0.2.1 2019-04-02 | ||
1. 添加未开放选课处理 | ||
2. cookie打印修复 | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// ==UserScript== | ||
// @name sjtu-automata | ||
// @namespace http://tampermonkey.net/ | ||
// @version 1.0 | ||
// @description show classid under classname. | ||
// @author MXWXZ | ||
// @match *://i.sjtu.edu.cn/xsxk/zzxkyzb_cxZzxkYzbIndex.html* | ||
// @homepageURL https://github.com/MXWXZ/sjtu-automata/ | ||
// @supportURL https://github.com/MXWXZ/sjtu-automata/issues/ | ||
// @downloadURL https://raw.githubusercontent.com/MXWXZ/sjtu-automata/master/sjtu-automata.user.js | ||
// @updateURL https://raw.githubusercontent.com/MXWXZ/sjtu-automata/master/sjtu-automata.user.js | ||
// @grant none | ||
// ==/UserScript== | ||
|
||
function waitForKeyElements(selectorTxt, actionFunction, bWaitOnce, iframeSelector) { | ||
var targetNodes, btargetsFound; | ||
if (typeof iframeSelector == "undefined") | ||
targetNodes = jQuery(selectorTxt); | ||
else | ||
targetNodes = jQuery(iframeSelector).contents() | ||
.find(selectorTxt); | ||
|
||
if (targetNodes && targetNodes.length > 0) { | ||
btargetsFound = true; | ||
targetNodes.each(function () { | ||
var jThis = jQuery(this); | ||
var alreadyFound = jThis.data('alreadyFound') || false; | ||
|
||
if (!alreadyFound) { | ||
var cancelFound = actionFunction(jThis); | ||
if (cancelFound) | ||
btargetsFound = false; | ||
else | ||
jThis.data('alreadyFound', true); | ||
} | ||
}); | ||
} | ||
else { | ||
btargetsFound = false; | ||
} | ||
|
||
var controlObj = waitForKeyElements.controlObj || {}; | ||
var controlKey = selectorTxt.replace(/[^\w]/g, "_"); | ||
var timeControl = controlObj[controlKey]; | ||
|
||
if (btargetsFound && bWaitOnce && timeControl) { | ||
clearInterval(timeControl); | ||
delete controlObj[controlKey] | ||
} | ||
else { | ||
if (!timeControl) { | ||
timeControl = setInterval(function () { | ||
waitForKeyElements(selectorTxt, | ||
actionFunction, | ||
bWaitOnce, | ||
iframeSelector | ||
); | ||
}, 300); | ||
controlObj[controlKey] = timeControl; | ||
} | ||
} | ||
waitForKeyElements.controlObj = controlObj; | ||
} | ||
|
||
function showid(node){ | ||
let id=node.children().children()[0].innerHTML; | ||
node.children('.jxbmc').append('<p>'+id+'</p>'); | ||
} | ||
|
||
(function() { | ||
'use strict'; | ||
|
||
let node=$('.nav.nav-tabs.sl_nav_tabs li'); | ||
node.each(function(){ | ||
let str=$(this).children('a')[0].getAttribute("onclick"); | ||
$(this).append('<p>'+str.substr(str.indexOf("','")+3,32)+' </p>'); | ||
}); | ||
waitForKeyElements('.body_tr', showid, false); | ||
})(); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
__description__ = 'Auto elect script for SJTUer.' | ||
__url__ = 'https://github.com/MXWXZ/sjtu-automata' | ||
__update_url__ = 'https://raw.githubusercontent.com/MXWXZ/sjtu-automata/master/version' | ||
__version__ = '0.2.1' | ||
__version__ = '0.3.0' | ||
__author__ = 'MXWXZ' | ||
__author_email__ = '[email protected]' | ||
__license__ = 'GNU General Public License v3 (GPLv3)' | ||
|
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.2.1 | ||
0.3.0 |