Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==UserScript==
- // @name Fill in Arnona form 1/4
- // @namespace http://tampermonkey.net/
- // @version 0.1
- // @description try to take over the world!
- // @author You
- // @match https://city4u.co.il/PortalServicesSite/cityPay/264000/mislaka/1
- // @grant none
- // ==/UserScript==
- //CcNumber
- (function() {
- 'use strict';
- fillInField("MisparHeshbon", "xxxxxx");
- fillInField("txtPhone", "xxxxxx");
- fillInField("txtEmail", "xxxx@gmail.com");
- fillInField("txtFullName", "xxxxx");
- fillInField("CcNumber", "xxxxxxx");
- fillInField("ccOwnerId", "xxxxx");
- fillInField("CcValidationCode", "029");
- var yearFieldName = "שנה";
- fillInComboBox(yearFieldName, "0", 0);
- var monthFieldName = "חודש";
- fillInComboBox(monthFieldName, "4", 1);
- })();
- function fillInField(fieldName, value) {
- (function() {
- var checkExist = setInterval(function() {
- var fieldObj = document.getElementById(fieldName);
- if (fieldObj != null) {
- console.log(fieldName + " exists!");
- fieldObj.value = value;
- clearInterval(checkExist);
- }
- }, 100); // check every 100ms
- })();
- }
- function fillInComboBox(fieldName, value, index) {
- (function() {
- var checkExist = setInterval(function() {
- var selectField = document.getElementsByClassName("select-cc-date")[index];
- var isField = selectField.innerHTML.includes(fieldName);
- if (isField) {
- console.log(fieldName + " exists!");
- selectField.value = value;
- clearInterval(checkExist);
- }
- }, 100); // check every 100ms
- })();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement