This document is a user script designed to create a red button on a specific webpage that, when clicked, autofills a form with predefined values. The script waits for the page to load, then appends the button and defines the autofill functionality for various input fields and dropdowns. It allows users to manually submit the form after autofilling the necessary information.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
69 views2 pages
1 Applicant Info Button
This document is a user script designed to create a red button on a specific webpage that, when clicked, autofills a form with predefined values. The script waits for the page to load, then appends the button and defines the autofill functionality for various input fields and dropdowns. It allows users to manually submit the form after autofilling the necessary information.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2
// ==UserScript==
// @name Applicant Info Button
// @namespace http://tampermonkey.net/ // @version 0.1 // @description Click on the button and autofill information // @author AyonVaiya // @match https://payment.ivacbd.com/* // @grant none // ==/UserScript==
(function() { 'use strict';
// Wait until the page is fully loaded
window.addEventListener('load', function() { // Create the red button const redButton = document.createElement('button'); redButton.innerText = 'Autofill Form'; redButton.style.position = 'fixed'; // Fixed position for the button redButton.style.top = '140px'; // Adjust the position to the top redButton.style.right = '20px'; // Adjust the position to the right redButton.style.backgroundColor = 'red'; redButton.style.color = 'white'; redButton.style.border = 'none'; redButton.style.padding = '10px 20px'; redButton.style.fontSize = '16px'; redButton.style.cursor = 'pointer';
// Append the button to the body
document.body.appendChild(redButton);
// Predefined form values
const formData = { webfile_id: 'BGDKV021FF25', webfile_id_repeat: 'BGDKV021FF25', visit_purpose: 'Better Medical Treatment', highcom: '5', // Value for "Khulna" ivac_id: '3', // Value for "IVAC, KHULNA" visa_type: '13', // Value for "MEDICAL/MEDICAL ATTENDANT VISA" family_count: '1', // Value for "1" family member };
const submitButton = document.querySelector('#submitButton'); if (submitButton) { // Enable the button if it's disabled if (submitButton.hasAttribute('disabled')) { submitButton.removeAttribute('disabled'); } // Leave the button clickable for manual click } }
// When the red button is clicked, autofill the form