Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions tiss_quick_registration_script.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name TISS Quick Registration Script
// @namespace http://www.manuelgeier.com/
// @version 1.6.3
// @version 1.6.4
// @description Script to help you to get into the group you want. Opens automatically the right panel, registers automatically and confirms your registration automatically. If you don't want the script to do everything automatically, the focus is already set on the right button, so you only need to confirm. There is also an option available to auto refresh the page, if the registration button is not available yet, so you can open the site and watch the script doing its work. You can also set a specific time when the script should reload the page and start.
// @match https://tiss.tuwien.ac.at/*
// @copyright 2012+, Manuel Geier, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Expand All @@ -10,6 +10,8 @@

/*
Changelog:
v.1.6.4 [21.11.2021]
~ Fix: previously all exams on the correct date were valid, ignoring exam name

v.1.6.3 [18.12.2020]
+ Added: date of exam support
Expand Down Expand Up @@ -80,7 +82,7 @@
registrationType: "group",

// name of you the group you want to join (only for registrationType 'group') [String]
nameOfGroup: "Gruppe 001",
nameOfGroup: "K2",

// name of the exam which you want to join (only for registrationType 'exam') [String]
nameOfExam: "Name Of Exam",
Expand All @@ -92,7 +94,7 @@
lvaCheckEnabled: true,

// only if the number is right, the script is enabled [String]
lvaNumber: "123.456",
lvaNumber: "104.398",

// if you have multiple study codes, enter here the study code number you want
// to register for eg. '123456' (no blanks). Otherwise leave empty. [String]
Expand All @@ -104,7 +106,7 @@
lvaSemesterCheckEnabled: true,

// only if the semester is right, the script is enabled [String]
lvaSemester: "2019W",
lvaSemester: "2022S",

// autoGoToSemester: true, // coming soon

Expand Down Expand Up @@ -136,7 +138,7 @@
// define the specific time the script should start [Date]
// new Date(year, month, day, hours, minutes, seconds, milliseconds)
// note: months start with 0
specificStartTime: new Date(2020, 1 - 1, 9, 20, 27, 0, 0),
specificStartTime: new Date(2022, 3 - 1, 1, 13, 30, 0, 0),

// if a specific time is defined, the script will refresh some ms sooner to adjust a delay [Integer]
delayAdjustmentInMs: 300,
Expand Down Expand Up @@ -596,7 +598,8 @@
var examData = $(this).text().trim();
var examLabel = self.getExamLabel(nameOfExam).first().text().trim() + " ";
var examDate = examData.replace(examLabel, '');
return examDate.match(dateOfExam);
var examRemainder = examDate.replace(dateOfExam, '');
return !examRemainder && examData;
});
};

Expand Down