Skip to content

Instantly share code, notes, and snippets.

@PatheticMustan
Last active November 3, 2024 00:14
Show Gist options
  • Save PatheticMustan/ec241d56a245bb5621780e00a50092ac to your computer and use it in GitHub Desktop.
Save PatheticMustan/ec241d56a245bb5621780e00a50092ac to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<style>
a {
font-size: xxx-large;
}
button {
width: 200px;
height: 50px;
font-size: x-large;
}
</style>
</head>
<body>
<button onclick="trigger();">Reload</button>
<div id="words"></div>
</body>
<script>
const words = document.getElementById("words");
function openMultipleTabs(urlsArray){
words.innerHTML = "";
urlsArray.forEach((url, i) => {
let link = document.createElement('a');
link.href = url;
link.innerText = "aaaa"+i;
words.appendChild(link);
words.appendChild(document.createElement("br"));
});
}
function trigger() {
let x = prompt("put words in")
.split("\r\n")
.map(v => `https://www.google.com/search?udm=2&q=${v}`);
openMultipleTabs(x);
}
</script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment