Created
February 18, 2017 01:16
-
-
Save robwent/d1736f8d7366cb25f1d0dd5fb2ba57bc to your computer and use it in GitHub Desktop.
Open a list of links in new browser tabs
This file contains hidden or 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> | |
<title>Open Tas</title> | |
<script> | |
function openWindow(){ | |
var x = document.getElementById('a').value.split('\n'); | |
for (var i = 0; i < x.length; i++) | |
if (x[i].indexOf('.') > 0) | |
if (x[i].indexOf('://') < 0) | |
window.open('http://'+x[i]); | |
else | |
window.open(x[i]); | |
} | |
</script> | |
<style> | |
html, body | |
{ | |
height : 99%; | |
width : 99%; | |
} | |
textarea | |
{ | |
height : 80%; | |
width : 90%; | |
} | |
</style> | |
</head> | |
<body> | |
<textarea id="a"></textarea> | |
<br> | |
<input type="button" value="Open Windows" onClick="openWindow()"> | |
<input type="button" value="Clear" onClick="document.getElementById('a').value=''"> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment