Run javascript on my Chrome extension

1

Talk the guys! I work most of the time filling out web forms, and most of the time I get about 50-100 pages with the same data ... So I have to manually fill out one by one. I had the idea of creating an extension in Chrome that allows me to fill out these forms with 1 click only. But I also need to execute the following javascript:

javascript: resRecebimentoSelecionado('1', 'Fulano de Souza', 'Gerente');

Currently my extension is

var data = document.getElementById("txtDataRecebimento");
data.value = "20/06/2018";

var motorista = document.getElementById("txtTransportadorNomeMotorista");
motorista.value = "Fulano";

var placa = document.getElementById("txtTransportadorPlacaVeiculo");
placa.value = "LLLXXX";

var obs = document.getElementById("txtObservacoes");
obs.value = "N/C";

Does anyone have any idea how I can perform this Javascript?

    
asked by anonymous 20.06.2018 / 20:36

1 answer

0

I use some automations simply by adding a javascript code as a favorite in the bookmarks bar.

Creating a new bookmark page and putting the code in the URL field.

Example:

javascript: var ok="Ola"; alert(ok); 

To use just click on the created bookmark it will run the code on any page you are on.

The only problem is that you need to format the whole code in one line and it's bad for maintenance.

    
20.06.2018 / 20:41