Last active
November 3, 2024 00:14
-
-
Save PatheticMustan/ec241d56a245bb5621780e00a50092ac to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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