<commit_before>﻿// ==UserScript==
// @name        Bwin registration
// @namespace   Bwin registration
// @description Prefill registration form on for all bwin labels
// @include     *bwin.*/registration*
// @include     *gamebookers.com*/registration*
// @exclude     *bwin.it*
// @exclude     *bwin.fr*
// @version     0.3.2
// @require     https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.js
// @require     https://raw.githubusercontent.com/drizet/PortalUserScripts/master/src/core/random.js
// @require     https://raw.githubusercontent.com/drizet/PortalUserScripts/master/src/core/common.js
// ==/UserScript==

$(function () {
    function pad(n, width, z) {
        z = z || '0';
        n = n + '';
        return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
    }


    if ($("#registration-form").length) {
        // Personal data
        $("#Input_NameData_FirstName").val(Random.getText(10));
        $("#Input_NameData_LastName").val(Random.getText(10));
        $("#Input_AddressData_AddressCountryCode").selectOptionByValue("GB");
        $("#Input_AddressData_AddressState").selectOptionByIndex(1);
        $("#Input_AddressData_AddressCity").val(Random.getText(6));
        $("#Input_AddressData_AddressZip").val("2" + Random.getNumbers(4));
        $("#Input_AddressData_AddressLine1").val("address");
        $("#Input_AddressData_AddressLine2").val("address2");

        $("#Input_CurrencyData_CurrencyCode").selectOptionByValue("EUR");
        $("#Input_BirthData_DateOfBirth").setDate(1, 1, 1992);
        $("#Input_ContactData_EmailAddress").val(Random.getEmail(8, "yopmail.com"));
        $("#Input_ContactData_PhoneNumber").val("1231231");

        // Account data
        $("#Input_LoginData_Username").val(Random.getUserName(4));
        $("#Input_LoginData_Password, #Input_LoginData_PasswordConfirmation, #Input_SecurityData_SecurityAnswer").val("123123qq");
        $("#Input_SecurityData_SecurityQuestion").selectOptionByIndex(1);

        // Confirmation
        $("#Input_TermsAndConditions_TacAcceptance, #Input_BonusData_BonusTacAccepted").check();
        $("#Captcha_Input_Answer").val("+++");

        // BE
        var nrnDate = "920101";
        var nrnSerialNumber = Random.getNumbers(3);
        var nrnChecksum = 97 - (parseInt(nrnDate + nrnSerialNumber) % 97);

        $("#Input_IdentificationData_NRNDate").val(nrnDate);
        $("#Input_IdentificationData_NRNSerialNumber").val(nrnSerialNumber);
        $("#Input_IdentificationData_NRNChecksum").val(pad(nrnChecksum, 2));
        $("#Input_IdentificationData_Profession").selectOptionByIndex(1);
        $("#Input_IdentificationData_CityOfBirth").val(Random.getText(6));

        // ES
	if(LabelIs("bwin.es"))
	{
 	   $("#Input_LoginData_Password, #Input_LoginData_PasswordConfirmation, #Input_SecurityData_SecurityAnswer").val("<PASSWORD>");

	   $("#Input_ContactData_MobileNumber").val("751234567");

           var dni = Random.getNumbers(8);
           var characters = "TRWAGMYFPDXBNJZSQVHLCKE";
           dni = dni + characters[parseInt(dni) % 23];
           $("#Input_NameData_SecondLastName").val(Random.getText(10));
           $("#Input_NieNif_IdDocumentNumber").val(dni);
	}
    }
});<commit_msg>updated version<commit_after>﻿// ==UserScript==
// @name        Bwin registration
// @namespace   Bwin registration
// @description Prefill registration form on for all bwin labels
// @include     *bwin.*/registration*
// @include     *gamebookers.com*/registration*
// @exclude     *bwin.it*
// @exclude     *bwin.fr*
// @version     0.3.3
// @require     https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.js
// @require     https://raw.githubusercontent.com/drizet/PortalUserScripts/master/src/core/random.js
// @require     https://raw.githubusercontent.com/drizet/PortalUserScripts/master/src/core/common.js
// ==/UserScript==

$(function () {
    function pad(n, width, z) {
        z = z || '0';
        n = n + '';
        return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
    }


    if ($("#registration-form").length) {
        // Personal data
        $("#Input_NameData_FirstName").val(Random.getText(10));
        $("#Input_NameData_LastName").val(Random.getText(10));
        $("#Input_AddressData_AddressCountryCode").selectOptionByValue("GB");
        $("#Input_AddressData_AddressState").selectOptionByIndex(1);
        $("#Input_AddressData_AddressCity").val(Random.getText(6));
        $("#Input_AddressData_AddressZip").val("2" + Random.getNumbers(4));
        $("#Input_AddressData_AddressLine1").val("address");
        $("#Input_AddressData_AddressLine2").val("address2");

        $("#Input_CurrencyData_CurrencyCode").selectOptionByValue("EUR");
        $("#Input_BirthData_DateOfBirth").setDate(1, 1, 1992);
        $("#Input_ContactData_EmailAddress").val(Random.getEmail(8, "yopmail.com"));
        $("#Input_ContactData_PhoneNumber").val("1231231");

        // Account data
        $("#Input_LoginData_Username").val(Random.getUserName(4));
        $("#Input_LoginData_Password, #Input_LoginData_PasswordConfirmation, #Input_SecurityData_SecurityAnswer").val("<PASSWORD>");
        $("#Input_SecurityData_SecurityQuestion").selectOptionByIndex(1);

        // Confirmation
        $("#Input_TermsAndConditions_TacAcceptance, #Input_BonusData_BonusTacAccepted").check();
        $("#Captcha_Input_Answer").val("+++");

        // BE
        var nrnDate = "920101";
        var nrnSerialNumber = Random.getNumbers(3);
        var nrnChecksum = 97 - (parseInt(nrnDate + nrnSerialNumber) % 97);

        $("#Input_IdentificationData_NRNDate").val(nrnDate);
        $("#Input_IdentificationData_NRNSerialNumber").val(nrnSerialNumber);
        $("#Input_IdentificationData_NRNChecksum").val(pad(nrnChecksum, 2));
        $("#Input_IdentificationData_Profession").selectOptionByIndex(1);
        $("#Input_IdentificationData_CityOfBirth").val(Random.getText(6));

        // ES
	if(LabelIs("bwin.es"))
	{
 	   $("#Input_LoginData_Password, #Input_LoginData_PasswordConfirmation, #Input_SecurityData_SecurityAnswer").val("<PASSWORD>");

	   $("#Input_ContactData_MobileNumber").val("751234567");

           var dni = Random.getNumbers(8);
           var characters = "TRWAGMYFPDXBNJZSQVHLCKE";
           dni = dni + characters[parseInt(dni) % 23];
           $("#Input_NameData_SecondLastName").val(Random.getText(10));
           $("#Input_NieNif_IdDocumentNumber").val(dni);
	}
    }
});
{'fraction_non_alphanumeric': 0.16671802773497688, 'fraction_numerical': 0.020338983050847456, 'mean_word_length': 3.6832611832611835, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 8, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2949419', 'n_tokens_mistral': 2100, 'n_tokens_neox': 2045, 'n_words': 243}