Auto Fill CEAC NIV

自动填充 CEAC NIV 表单并选择特定选项

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Auto Fill CEAC NIV
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  自动填充 CEAC NIV 表单并选择特定选项
// @author       Bluefissure
// @license      MIT
// @match        https://ceac.state.gov/CEACStatTracker/Status.aspx?App=NIV*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    window.addEventListener('load', function() {
        const locationDropdown = document.getElementById('Location_Dropdown');
        if (locationDropdown) {
            locationDropdown.value = 'GUZ';
        }

        const visaCaseNumberInput = document.getElementById('Visa_Case_Number');
        if (visaCaseNumberInput) {
            visaCaseNumberInput.value = '123456';
        }

        const passportNumberInput = document.getElementById('Passport_Number');
        if (passportNumberInput) {
            passportNumberInput.value = 'E98765432';
        }

        const surnameInput = document.getElementById('Surname');
        if (surnameInput) {
            surnameInput.value = 'ABCDE';
        }
    });
})();