diff --git a/README.md b/README.md
index bb910f1..541049d 100644
--- a/README.md
+++ b/README.md
@@ -4,13 +4,12 @@ Search Firefox tabs and get a list or automatic direct to the searched tab.
# Download
https://addons.mozilla.org/en-US/firefox/addon/tab-search-and-manage/
-# Version: 1.3.5
-* Fixed search backspaceing not working
-* Fixed controls being over search bar
-* applied thin scrollbar
+# Version: 1.3.6
+* Added create new window button
+
***Note:
-To get tab hiding functionality, you must go to about:config and search for extensions.webextensions.tabhide.enabled. Set it to true by double clicking it. Then tabs can be shown or hidden via the eyes.
+To get tab hiding functionality, you must have Firefox 61. Then go to about:config and search for extensions.webextensions.tabhide.enabled. Set it to true by double clicking it. Then tabs can be shown or hidden via the eyes.
# Images
diff --git a/src/icons/add-window.png b/src/icons/add-window.png
new file mode 100644
index 0000000..e4e413a
Binary files /dev/null and b/src/icons/add-window.png differ
diff --git a/src/manifest.json b/src/manifest.json
index f371277..f2eb289 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Tab Search and Manage",
- "version": "1.3.5",
+ "version": "1.3.6",
"description": "This plugin can search, drag-n-drop ordering, and (un)hide all or some tabs.",
"applications": {
diff --git a/src/pages/tabsSearch.html b/src/pages/tabsSearch.html
index de8d313..0eb75e9 100755
--- a/src/pages/tabsSearch.html
+++ b/src/pages/tabsSearch.html
@@ -18,8 +18,9 @@
-
+
+
diff --git a/src/scripts/eventListeners.js b/src/scripts/eventListeners.js
index d1f9540..e36c0a0 100644
--- a/src/scripts/eventListeners.js
+++ b/src/scripts/eventListeners.js
@@ -23,6 +23,8 @@ document.addEventListener("click", (e) => {
scrollToView(200);
} else if (targetID == "newTab") {
createTab();
+ } else if (targetID == "newWin") {
+ createWin();
} else if (targetID == "hideTgglBttn") {
if (hoverTarget) {
hideSelectedTabAction(hoverTarget, hoverTarget.id);
diff --git a/src/scripts/generateView.js b/src/scripts/generateView.js
index 3cc31d4..4e88abd 100644
--- a/src/scripts/generateView.js
+++ b/src/scripts/generateView.js
@@ -1,5 +1,6 @@
const storageArea = browser.storage.local;
const tabsAction = browser.tabs;
+const windowsAction = browser.windows;
const searchBar = document.getElementById("searchBar");
const errHandler = document.getElementById("errorZone");
const listZone = document.getElementById("listZone");
@@ -94,22 +95,27 @@ function createTab() {
tabsAction.create({})
.then(function (tab) {
createContainer(tab);
- })
+ });
+}
+
+function createWin() {
+ windowsAction.create({});
}
function moveTabControlTo(elm) {
- let tabControls = document.getElementById("tabControls");
- let rect = elm.getBoundingClientRect();
+ let tabControls = document.getElementById("tabControls");
+ let hideTgglBttn = tabControls.querySelector("#hideTgglBttn")
+ let rect = elm.getBoundingClientRect();
tabControls.style.left = (rect.left - 46) + "px";
tabControls.style.top = rect.top + "px";
hoverTarget = elm;
if (elm.className == "block hiddenBGColor")
- document.getElementById("tabControls").querySelector("#hideTgglBttn").src = "../icons/eyeClosed.png";
+ hideTgglBttn.src = "../icons/eyeClosed.png";
else
- document.getElementById("tabControls").querySelector("#hideTgglBttn").src = "../icons/eyeOpen.png";
+ hideTgglBttn.src = "../icons/eyeOpen.png";
- document.getElementById("tabControls").style.display = "";
+ tabControls.style.display = "";
}
function onError(error) { console.log(`Error: ${error}`); }