Changed new tab workings.
This commit is contained in:
@@ -11,7 +11,6 @@ function logTabs(tabs) {
|
||||
for (let tab of tabs) {
|
||||
createContainer(tab);
|
||||
}
|
||||
addPlusContainer();
|
||||
// Set poped-out-window position and 100px up from selected elm
|
||||
oldElm.scrollIntoView();
|
||||
window.scrollBy(0, -100);
|
||||
@@ -53,23 +52,6 @@ function createContainer(tab) {
|
||||
}
|
||||
}
|
||||
|
||||
function addPlusContainer() {
|
||||
var spanTag = document.createElement("SPAN");
|
||||
var centerTag = document.createElement("CENTER");
|
||||
var icoImgTag = document.createElement("IMG");
|
||||
|
||||
spanTag .addEventListener("click", createTab);
|
||||
spanTag.title = "Open a new tab...";
|
||||
spanTag.className = "block";
|
||||
icoImgTag.style = "width: 100%; height:auto";
|
||||
icoImgTag.src = "../icons/plus.png";
|
||||
|
||||
centerTag.appendChild(icoImgTag);
|
||||
spanTag.appendChild(centerTag);
|
||||
listZone.appendChild(spanTag);
|
||||
plusTag = spanTag;
|
||||
}
|
||||
|
||||
function createTab() {
|
||||
tabsAction.create({})
|
||||
.then(function (tab) {
|
||||
|
||||
Reference in New Issue
Block a user