Global

Members

payload :Object

Payload for scrapping postani-student.hr
Type:
  • Object
Properties:
Name Type Description
Mjesto string
lista Array
page number
podrucje string
polje string
posebnaKvota string
search string
searchVisokaUcilista string
usporedba Boolean
Source:

Methods

add_default_options(selectUcilista, selectSastavnice)

Add default options to the select elements.
Parameters:
Name Type Description
selectUcilista HTMLSelectElement The select element for ucilista
selectSastavnice HTMLSelectElement The select element for sastavnice ucilista
Source:

add_options(selectUcilista, selectSastavnice, ucilista, vrsta)

Add options, filter by vrsta (-1 is all), to the Ucilista and Sastavnice select elements.
Parameters:
Name Type Description
selectUcilista HTMLSelectElement The select element for ucilista.
selectSastavnice HTMLSelectElement The select element for sastavnice.
ucilista object An json object containing all of the ucilista, their ids, names, and the same info for all of their sastavnice
vrsta number Vrsta ucilista, -1 is the default (all options), look at the first select element in scrape.html for other options and their values.
Source:

clear_options(selectUcilista, selectSastavnice)

Clears options from select elements for ucilista and sastavnice.
Parameters:
Name Type Description
selectUcilista HTMLSelectElement Select element for ucilista.
selectSastavnice HTMLSelectElement Select element for sastavnice.
Source:

displayMethod(method, action)

Displays the selected method.
Parameters:
Name Type Description
method string The chosen method
action string The chosen action
Source:

emailLogin(action)

Handles login with email method.
Parameters:
Name Type Description
action string Chosen email login action.
Source:

filter_by_vrsta(vrsta, ucilista) → {object}

Filters the ucilista object by vrsta ucilista.
Parameters:
Name Type Description
vrsta number vrsta ucilista
ucilista object An object containing ucilista and their vrsta alongside other info.
Source:
Returns:
- ucilista filtered by vrsta
Type
object

googleLogin()

Handle google login with redirect (iOS compatible).
Source:

init_buttons()

Initialize all buttons with their event handlers.
Source:

init_methods_form()

Attaches an event listener to all buttons in the methods form.
Source:

loading_screen()

Starts the loading screen.
Source:

(async) main() → {void}

Application Entry Point This is the main entry function that initializes and runs the entire aplication. It serves as the starting point for all aplication logic.
Source:
Returns:
Type
void

make_payload_lista(ucilista) → {Array}

Function that makes the lista of all the sastavnica ids that should go into the payload.
Parameters:
Name Type Description
ucilista * an object containing all of their ids, vrsta and names, as well as their sastavnica alongside their ids and names
Source:
Returns:
- an array of the (filtered) ids that go into the payloads lista
Type
Array

next_page()

Updates the payload to select the next page, that is next batch of programs.
Source:

populate_programi(data)

Popuplates the programi table with scraped programi data for a single page.
Parameters:
Name Type Description
data * the (`response.data.d) object from the response to the axios post request.
Source:

prepare_email_signin()

Prepares the email signin form.
Source:

prepare_email_signup()

Prepares the email signup form.
Source:

(async) scrapePrograms()

Scrape programs data from postani-student.hr using axios.
Source:

signIn(email, password)

Sign in user using firebase sdk.
Parameters:
Name Type Description
email string
password string
Source:

signUp(email, password)

create firebase user with firebase sdk
Parameters:
Name Type Description
email string
password string
Source:

signinListener(event)

Read email and password and then sign in user.
Parameters:
Name Type Description
event event yeah idk
Source:

signupListener(event)

Read email and password and then signup user.
Parameters:
Name Type Description
event event
Source:

stop_loading_screen()

hides the loading text when everything is loaded and displays the methods container
Source:

test_handler(test_index)

Describes the each test with it's own index.
Parameters:
Name Type Description
test_index Number index of a test
Source:

update_firebase_profile(username, photoURL, user, firstName, lastName, email)

Update firebase profile.
Parameters:
Name Type Description
username string User's desired username
photoURL string User's desired photo URL
user user firebase user object
firstName string User's first name
lastName string User's last name
email string User's email
Source:

vrstaFilter(ucilista)

Filters options according to vrsta selected.
Parameters:
Name Type Description
ucilista object Ucilista information object.
Source:
See:
  • ../data/ucilista.json for the exact structure.