Login

22:09:36 16/12/2024

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

Advertisement:

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

Advertisement:

// ==UserScript==
// @name        Login
// @namespace   Login to account
// @match       https://fap.fpt.edu.vn/Default.aspx
// @grant       none
// @version     1.0
// @author      -Eric Anti Code
// @description 22:09:36 16/12/2024
// ==/UserScript==
(function() {
    'use strict';

    setTimeout(() => {
        // Tìm dropdown campus
        const campusDropdown = document.getElementById("ctl00_mainContent_ddlCampus");
        const selectedValue = campusDropdown.value;

        if (selectedValue === "4") {
            clickLoginButton();
        } else {
            campusDropdown.value = "4";
            __doPostBack('ctl00$mainContent$ddlCampus', '');
        }
    }, 2000);

    function clickLoginButton() {
        const intervalId = setInterval(() => {
            const googlePlusButton = document.querySelector('span.fa.fa-google-plus');

            if (googlePlusButton) {
                googlePlusButton.click();
                clearInterval(intervalId);
            }
        }, 1000);
    }
})();