Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name DresdenAutoBooking
- // @namespace Violentmonkey Scripts
- // @grant none
- // ==/UserScript==
- //
- let arrayForPlaces =
- [{
- idPlace: 14,
- timeTOPlay: 69
- },
- {
- idPlace: 15,
- timeTOPlay: 72
- },
- {
- idPlace: 16,
- timeTOPlay: 75
- }, {
- idPlace: 28,
- timeTOPlay: 66
- }];
- function takingPlace() {
- let currentPlace = document.getElementsByName('freeTimeContainer:free_time.place')[0];
- if (typeof(currentPlace) !== 'undefined') {
- currentPlace = currentPlace.selectedIndex;
- for (let obj in arrayForPlaces) {
- if (currentPlace === arrayForPlaces[obj].idPlace) {
- let x;
- x = document.getElementsByClassName('content')[arrayForPlaces[obj].timeTOPlay];
- if (typeof(x) !== 'undefined') {
- x = x.firstElementChild;
- x.click();
- x.form.submit();
- }
- }
- }
- }
- }
- takingPlace();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement