Program: Let Me Google That For You
function populateTextbox() {
var strURL = ""
var urlParams = ""
var strURLParam = ""
var strNewLink = ""
var blnIsLink = 0;
var letters
strURL = window.location.search;
blnIsLink = strURL.indexOf("Link");
if (blnIsLink == 1) {
urlParams = new URLSearchParams(strURL);
strURLParam = urlParams.get("Link");
strNewLink = "https://www.google.com/search?q=" + strURLParam.replace(' ', '+');
letters = strURLParam.split("");
for (i = 0; i <= strURLParam.length - 1; i++) {
timeoutLoop(i, letters);
};
$('a[id*="lbLMGTFY"]').attr("href", strNewLink);
setTimeout(function () {
$('a[id*="lbLMGTFY"]').addClass("click-here");
}, 3000);
} else {
};
};
function timeoutLoop(i, letters) {
setTimeout(function () {
$('input[id*="tbLMGTFY"]').val($('input[id*="tbLMGTFY"]').val() + letters[i]);
}, i * 200);
};