From 18412d0be538c681eecca6b8a07442b9a9bfa3c8 Mon Sep 17 00:00:00 2001 From: Meujael Date: Wed, 15 Jan 2025 14:21:21 +0100 Subject: [PATCH 1/3] Atualizar o pull_request_template.md --- .github/pull_request_template.md | 117 +++++++++++++++++++++++++++++-- 1 file changed, 113 insertions(+), 4 deletions(-) diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index cab762b7..f3c08e61 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,116 @@ -### Please note: the project is currently temporarily suspended from receiving direct code contributions. +// ==UserScript== +// @name Em Viagens Travel +// @namespace http://tampermonkey.net/ +// @version 1.7 +// @description Script para preencher automaticamente formulários com 6 perfis diferentes usando botões de perfis na lateral da página. +// @author laurindo +// @match https://visa.vfsglobal.com/* +// @grant none +// ==/UserScript== -Please do not submit any new pull requests, they will be close immediately. +(function () { + 'use strict'; -If you have any ideas and suggestions, please submit them to us through [`Issues`](https://github.com/quoid/userscripts/issues) or [`Discussions`](https://github.com/quoid/userscripts/discussions). + // Perfis de preenchimento + const perfis = [ + { + nome: "Nacional", + primeiroNome: "ANTONIO", + ultimoNome: "MICOLO", + dataNascimento: "13/06/1990", + numeroPassaporte: "N3420081", + dataExpiracaoPassaporte: "02/09/2039", + telefone: "937574306", + email: "mikasamoreco@gmail.com", + codigoPais: "244" + }, + { + nome: "Nacional", + primeiroNome: "JORGE", + ultimoNome: "CASIMIRO", + dataNascimento: "14/06/2003", + numeroPassaporte: "N3382629", + dataExpiracaoPassaporte: "01/08/2034", + telefone: "937574306", + email: "mikasamoreco@gmail.com", + codigoPais: "244" + }, + { + nome: "prioridade", + primeiroNome: "WILL", + ultimoNome: "CABIÇO", + dataNascimento: "01/08/1982", + numeroPassaporte: "N3494361", + dataExpiracaoPassaporte: "07/11/2039", + telefone: "937574306", + email: "mikasamoreco@gmail.com", + codigoPais: "244" + }, + {codigoPais: "244" -We apologize for the inconvenience and thank you for your understanding. + } + ]; + + // Função para preencher o formulário com base no perfil selecionado + function preencherFormulario(perfil) { + const mapCampos = { + primeiroNome: "input[placeholder='Enter your first name']", + ultimoNome: "input[placeholder='Please enter last name.']", + dataNascimento: "input[placeholder='Please select the date']", + numeroPassaporte: "input[placeholder='Enter passport number']", + dataExpiracaoPassaporte: "#passportExpirtyDate", + codigoPais: "input[placeholder='44']", + telefone: "input[placeholder='012345648382']", + email: "input[placeholder='Enter Email Address']", + }; + + for (const campo in mapCampos) { + const input = document.querySelector(mapCampos[campo]); + if (input && perfil[campo]) { + input.value = perfil[campo]; + input.dispatchEvent(new Event('input', { bubbles: true })); + } + } + + alert(`Campos preenchidos com sucesso para ${perfil.nome}!`); + } + + // Adicionar botões de perfil na lateral + function addProfileButtons() { + const sidebar = document.createElement('div'); + sidebar.style.cssText = ` + position: fixed; + top: 10%; + right: 0; + z-index: 9999; + background: rgba(255, 255, 255, 0.95); + width: 200px; + padding: 10px; + border-radius: 5px 0 0 5px; + box-shadow: -3px 0 5px rgba(0, 0, 0, 0.2); + `; + sidebar.innerHTML = `

Escolher Perfil

`; + document.body.appendChild(sidebar); + + perfis.forEach((perfil, index) => { + const button = document.createElement('button'); + button.textContent = perfil.nome; + button.style.cssText = ` + display: block; + margin: 5px auto; + padding: 8px; + width: 90%; + background: #b94c19; + color: white; + border: none; + border-radius: 5px; + cursor: pointer; + `; + button.addEventListener('click', () => preencherFormulario(perfil)); + sidebar.appendChild(button); + }); + } + + // Executar ao carregar a página + window.addEventListener('load', addProfileButtons); +})(); \ No newline at end of file From f0e84c97946e268f18a627c2ead10c11e7b4df02 Mon Sep 17 00:00:00 2001 From: Meujael Date: Wed, 15 Jan 2025 14:49:23 +0100 Subject: [PATCH 2/3] Atualizar o deployment.yaml --- .github/workflows/deployment.yaml | 138 +++++++++++++++--------------- 1 file changed, 71 insertions(+), 67 deletions(-) diff --git a/.github/workflows/deployment.yaml b/.github/workflows/deployment.yaml index 62df6d21..5768aa1a 100644 --- a/.github/workflows/deployment.yaml +++ b/.github/workflows/deployment.yaml @@ -1,68 +1,72 @@ -# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions +// ==UserScript== +// @name Preenchimento Automático de Login Atualizado +// @namespace http://tampermonkey.net/ +// @version 1.4 +// @author Marques +// @match https://visa.vfsglobal.com/* +// @grant none +// ==/UserScript== -name: Userscripts deployment -on: - release: - types: [published] # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release -jobs: - Deployment: - strategy: - matrix: # https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs - platform: [mac, ios] - runs-on: macos-latest # https://github.com/actions/runner-images - steps: - - uses: actions/checkout@v4 # https://github.com/actions/checkout - with: - fetch-depth: 0 - fetch-tags: true # https://github.com/actions/checkout/issues/1781 - - uses: actions/setup-node@v4 # https://github.com/actions/setup-node - with: - node-version: latest - - id: semver # Parse semver from github ref - uses: userscriptsup/actions/semver-parser@main - - name: Verify release type - run: | - if ${{ github.event.release.prerelease }}; then - ${{ steps.semver.outputs.beta }} || exit 11 - else - ${{ steps.semver.outputs.alpha }} && exit 12 - ${{ steps.semver.outputs.beta }} && exit 13 - [ -n "${{ steps.semver.outputs.prerelease }}" ] && exit 14 - exit 0 - fi - - run: npm ci - - run: npm run lint:js - - run: npm run lint:css - - run: BETA=1 npm run build:${{ matrix.platform }}-safari-15 - if: ${{ github.event.release.prerelease }} - - run: npm run build:${{ matrix.platform }}-safari-15 - if: ${{ ! github.event.release.prerelease }} - - name: Set xcode version - run: sudo xcode-select -s "/Applications/Xcode_15.4.app" # https://github.com/actions/runner-images/blob/main/images/macos/macos-14-arm64-Readme.md#xcode - - name: Run fastlane - id: fastlane - working-directory: ./fastlane - env: - FASTLANE_OPT_OUT_USAGE: "YES" - MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} - MATCH_GIT_PRIVATE_KEY: "fastlane/${{ secrets.GIT_PRIVATE_KEY_FILE }}" - GIT_PRIVATE_KEY_FILE: ${{ secrets.GIT_PRIVATE_KEY_FILE }} - GIT_PRIVATE_KEY_BASE64: ${{ secrets.GIT_PRIVATE_KEY_BASE64 }} # https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions#storing-base64-binary-blobs-as-secrets - MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} - GYM_INSTALLER_CERT_NAME: ${{ secrets.GYM_INSTALLER_CERT_NAME }} # required for mac (unable to auto-detect) - APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} - APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} - APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }} - MARKETING_VERSION: ${{ steps.semver.outputs.core }} - IS_PRERELEASE: ${{ github.event.release.prerelease }} - run: | - echo $GIT_PRIVATE_KEY_BASE64 | base64 --decode > $GIT_PRIVATE_KEY_FILE - chmod 600 $GIT_PRIVATE_KEY_FILE - bundle install - $IS_PRERELEASE && bundle exec fastlane ${{ matrix.platform }} beta - $IS_PRERELEASE || bundle exec fastlane ${{ matrix.platform }} release - - name: Artifact dSYM - uses: actions/upload-artifact@v4 # https://github.com/actions/upload-artifact - with: - name: Userscripts_${{ matrix.platform }}_${{ steps.fastlane.outputs.ver || github.ref_name }}.app.dSYM - path: build/*.dSYM.zip +(function () { + 'use strict'; + + // Lista de contas + const contas = [ + { email: "mikasamoreco@gmail.com", senha: "Cleuria2122!" }, + { email: "mikasamoreco@gmail.com", senha: "Cleuria2122!" } + ]; + + let contaAtual = contas[0]; // Conta padrão + + function preencherLogin() { + const campoEmail = document.querySelector('input[type="email"], input[name="email"], input#email'); + const campoSenha = document.querySelector('input[type="password"], input[name="password"], input#password'); + + if (campoEmail && campoSenha) { + campoEmail.value = contaAtual.email; + campoEmail.dispatchEvent(new Event('input', { bubbles: true })); + + campoSenha.value = contaAtual.senha; + campoSenha.dispatchEvent(new Event('input', { bubbles: true })); + + console.log("Campos preenchidos com sucesso!"); + } else { + console.warn("Campos não encontrados."); + } + } + + function alternarConta() { + let novaConta = prompt("Escolha a conta (0 para primeira, 1 para segunda):", "0"); + if (novaConta !== null && contas[novaConta]) { + contaAtual = contas[novaConta]; + preencherLogin(); + } else { + alert("Conta inválida!"); + } + } + + function criarBotao() { + const botao = document.createElement("button"); + botao.textContent = "Preencher Login"; + botao.style.position = "fixed"; + botao.style.top = "50%"; // Centraliza verticalmente + botao.style.left = "50%"; // Centraliza horizontalmente + botao.style.transform = "translate(-50%, -50%)"; // Ajusta para garantir que o centro seja exato + botao.style.padding = "10px"; + botao.style.backgroundColor = "#4CAF50"; + botao.style.color = "#fff"; + botao.style.border = "none"; + botao.style.borderRadius = "5px"; + botao.style.cursor = "pointer"; + botao.style.zIndex = "9999"; + + botao.onclick = alternarConta; + + document.body.appendChild(botao); + } + + // Tenta preencher os campos após o carregamento + setInterval(preencherLogin, 1000); + + window.addEventListener('load', criarBotao); +})(); From f6c9e5c295045092b9df03d8dc2d51a5921718e3 Mon Sep 17 00:00:00 2001 From: Meujael Date: Wed, 15 Jan 2025 18:01:36 +0100 Subject: [PATCH 3/3] Atualizar o README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a17b958..0e05c28c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ - +António Micolo // ==UserScript== // @name VFS VISA NOVO // @namespace http://tampermonkey.net/