There is a website where you can get statistics on sites. On the website the input in which you want to insert data
<input name="url"> Input in the button
<input name="proceed"> Text:
<b style="color:red"> I do this through tampermonkey. I do this:
var jq = document.createElement('script'); jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"; document.getElementsByTagName('head')[0].appendChild(jq); jq.addEventListener('load',function () { var result = []; var websiteName = $('input[name=url]').val(); var styleRedEl = $('b[style*="color:red"]').text(); result[websiteName]=styleRedEl; console.log ( result ); var websitesArr = [ "ya.ru", "google.com", "ok.ru", "vk.com", "fb.com" ]; var inputVal = $('input[name=url]').val(); for (i=0; i<websitesArr.length; i++) { $('input[name=url]').val(websitesArr[i]); alert (websitesArr[i]); $('input[name=proceed]').trigger('click'); } }); How to solve the problem that the page is updated only after the cycle has passed through all the elements of the array and in turn has inserted them into the form and only after that presses the button. It is necessary that the button is pressed immediately after inserting each element of the array into the input.