-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpopup.js
More file actions
24 lines (20 loc) · 681 Bytes
/
Copy pathpopup.js
File metadata and controls
24 lines (20 loc) · 681 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
document.addEventListener("DOMContentLoaded", init, false);
function init() {
var input = document.getElementById("inputText");
input.focus();
var textarea = document.getElementById("urls");
textarea.addEventListener('change', function () {
localStorage["urls"] = textarea.value;
}, false);
var savedUrls = localStorage["urls"];
if (savedUrls) {
textarea.value = savedUrls;
var urls = savedUrls.split('\n');
textarea.rows = urls.length;
}
var button = document.getElementById("openButton");
button.addEventListener('click', onclick, false);
function onclick() {
openlinks(input.value);
}
}