Multi Search on Google

Search something multiple times with different values on Google

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Multi Search on Google
// @namespace    https://www.youtube.com/channel/UCt7HddEns2mcAoRTyn564Xg
// @version      2.1
// @description  Search something multiple times with different values on Google
// @author       Jakegeyer27 & Kelts360
// @match        *://www.google.com.au/*
// @grant        window.close
// ==/UserScript==

//variables
var searchbox = document.getElementById("lst-ib");
var variables = [];
var amount = null;
var num = 0;
var search = null;

function1();

function function1() {
    if (searchbox.value.includes("??")) {
        var variables = prompt("Enter variables seperated by a comma","1, 2, 3").split(", ");
        var amount = variables.length;
        window.close();
        for (num = 0; num < amount; num++) {
            var search = searchbox.value.replace("??", variables[num]);
            window.open('https://www.google.com.au/?#q=' + search);
} relay();
} else {
    relay();
}
}

//Stops the script re-running once completed
function relay() {
    relay();
}