I want to edit a function of a website after the page is loaded.. When the page is loaded it contains a function like this
function PosttempKey(){
var token_dt = d.getHours() +''+ d.getMinutes() +''+ d.getSeconds();
var random = Math.floor(Math.random() * 1000) + 1;
var temp_key = token_dt + '' + random;
$.post( contextPath + "/doServlet", {key : "send.PostKey", TEMPORARY_KEY:temp_key, USER_EMAIL:user_email }, function(data, status) {
console.log(data); }
As you can see the function do not return any value, but just logs it.
What I want to do is to add some code inside the function PosttempKey
like return data;
so that it will return data after it executes.
we can edit the html content using document.queryselector(.class).value = "abc";
But is there a way I can modify the Script(function) as well ?
Please help ~