-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedit.js
More file actions
24 lines (20 loc) · 717 Bytes
/
edit.js
File metadata and controls
24 lines (20 loc) · 717 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
checkForNextName();
function checkForNextName() {
if(localStorage["nextName"]) {
document.getElementById("name").value = localStorage["nextName"];
}
}
document.querySelector("#save").addEventListener('click', function() {
removeBatch(localStorage["nextName"]);
saveTabs(localStorage["lastID"]);
localStorage.removeItem("nextName");
localStorage.removeItem("lastID");
document.getElementById("name").style.display = "none";
document.getElementById("save").style.display = "none";
document.getElementById("editInfo").innerHTML = "Saved! This window will close shortly.";
setTimeout(function() {
chrome.windows.getCurrent(function(result) {
chrome.windows.remove(result.id);
});
}, 1000);
});