hi i have the below script where it runs autosearch for bing search engine.the problem is it searches random wording for 20times let say if i search for "Nice" for the first time and "Argentina" for the second time and it goes on 20 times with the word of my choice. how do i modify the script
please help me
The script as follows:
var iter = getURLParameter("brNum"); if(iter == null){ iter = 0; } iter = parseInt(iter)+1;
Autosearch for particular words in search engine
hi i have the below script where it runs autosearch for bing search engine.the problem is it searches random wording for 20times let say if i search for "Nice" for the first time and "Argentina" for the second time and it goes on 20 times with the word of my choice. how do i modify the script
please help me
The script as follows:
var iter = getURLParameter("brNum");
if(iter == null){
iter = 0;
}
iter = parseInt(iter)+1;
if (iter > 20){
return false;
}
window.setTimeout(function() {
var wordLength = Math.floor((Math.random()*6)+4);
var newQuery = createRandomWord(wordLength);
window.open("http://www.bing.com/search/infospace?query="+newQuery+"&brNum="+iter,"_self");
}, (Math.random()*4000)+1000); //THESE ARE THE TIMEOUT VALUES (4000 is the random factor of 4 seconds, 1000 is the minimum time of 1 second)
function createRandomWord(length) {
var consonants = 'bcdfghjklmnpqrstvwxyz',
vowels = 'aeiou',
rand = function(limit) {
return Math.floor(Math.random()*limit);
},
i, word='', length = parseInt(length,10),
consonants = consonants.split(''),
vowels = vowels.split('');
for (i=0;i