From ab7984f518ffc021bee3d9e6fb2354a3ba8363bd Mon Sep 17 00:00:00 2001 From: Markus Stefanko Date: Thu, 16 Apr 2020 14:14:07 +0700 Subject: [PATCH] Update to 5.1.4 --- .babelrc | 2 +- CHANGELOG.md | 4 +++ changelog.html | 7 ++++- manifest-firefox.json | 2 +- manifest.json | 2 +- outlib/TabManager.js | 2 +- outlib/TabOptions.js | 2 +- outlib/TabOptionsFirefox.js | 2 +- outlib/background.js | 54 ++++++++++++++++++++++++++----------- package.json | 5 +++- readme.md | 2 +- 11 files changed, 60 insertions(+), 24 deletions(-) diff --git a/.babelrc b/.babelrc index 13605af2..49e4799e 100644 --- a/.babelrc +++ b/.babelrc @@ -9,7 +9,7 @@ "sourceType": "script", "plugins": [ ["inline-replace-variables", { - "__VERSION__": "5.1.3" + "__VERSION__": "5.1.4" }] ] } diff --git a/CHANGELOG.md b/CHANGELOG.md index b5a1a687..c21925f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +5.1.4 +===== +- Moving multiple tabs would sometimes not work when using the button or [Enter] key. This should be fixed now + 5.1.3 ===== - Fix: Popup width adjustable again instead of stuck to 800px diff --git a/changelog.html b/changelog.html index 16327ed7..ed98ec78 100644 --- a/changelog.html +++ b/changelog.html @@ -18,7 +18,7 @@
-

Tab Manager Plus 5.1.3

+

Tab Manager Plus 5.1.4

@@ -34,6 +34,11 @@

Here's what's planned for future versions

Here's what's new since the last time

+

5.1.4

+
    +
  • Fix: Moving multiple tabs would sometimes not work when using the button or [Enter] key. This should be fixed now
  • +
+

5.1.3

  • Fix: Popup width adjustable again instead of stuck to 800px
  • diff --git a/manifest-firefox.json b/manifest-firefox.json index 37f28d20..b750b899 100644 --- a/manifest-firefox.json +++ b/manifest-firefox.json @@ -1,7 +1,7 @@ { "name": "Tab Manager Plus for Firefox", "short_name": "Tab Manager+", - "version": "5.1.3", + "version": "5.1.4", "manifest_version": 2, "description": "Quickly find open tabs, see all windows in one view, find duplicates and limit tabs per window. The best Tab Manager for Firefox.", "author": "stefanXO", diff --git a/manifest.json b/manifest.json index c09b9103..eec67ce8 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Tab Manager Plus for Chrome", "short_name": "Tab Manager+", - "version": "5.1.3", + "version": "5.1.4", "manifest_version": 2, "offline_enabled": true, "description": "Quickly find open tabs, see all windows in one view, find duplicates and limit tabs per window. The best Tab Manager for Chrome.", diff --git a/outlib/TabManager.js b/outlib/TabManager.js index fa6230b2..cb36ad4d 100644 --- a/outlib/TabManager.js +++ b/outlib/TabManager.js @@ -52,7 +52,7 @@ TabManager = function (_React$Component) {_inherits(TabManager, _React$Component if (typeof localStorage["sessionsFeature"] === "undefined") localStorage["sessionsFeature"] = "0"; if (typeof localStorage["hideWindows"] === "undefined") localStorage["hideWindows"] = "0"; if (typeof localStorage["filter-tabs"] === "undefined") localStorage["filter-tabs"] = "0"; - if (typeof localStorage["version"] === "undefined") localStorage["version"] = "5.1.3"; + if (typeof localStorage["version"] === "undefined") localStorage["version"] = "5.1.4"; layout = localStorage["layout"]; tabLimit = JSON.parse(localStorage["tabLimit"]); diff --git a/outlib/TabOptions.js b/outlib/TabOptions.js index 32be1f89..b3178533 100644 --- a/outlib/TabOptions.js +++ b/outlib/TabOptions.js @@ -6,7 +6,7 @@ TabOptions = function (_React$Component) {_inherits(TabOptions, _React$Component _this.state = {};return _this; }_createClass(TabOptions, [{ key: "logo", value: function logo() { - var logo = [React.createElement("img", { src: "images/browsers.svg", style: { maxWidth: "3rem" } }), React.createElement("h2", null, "Tab Manager Plus ", "5.1.3")]; + var logo = [React.createElement("img", { src: "images/browsers.svg", style: { maxWidth: "3rem" } }), React.createElement("h2", null, "Tab Manager Plus ", "5.1.4")]; return ( React.createElement("div", { className: "logo-options" }, diff --git a/outlib/TabOptionsFirefox.js b/outlib/TabOptionsFirefox.js index 54e8dd11..1da3ad43 100644 --- a/outlib/TabOptionsFirefox.js +++ b/outlib/TabOptionsFirefox.js @@ -6,7 +6,7 @@ TabOptions = function (_React$Component) {_inherits(TabOptions, _React$Component _this.state = {};return _this; }_createClass(TabOptions, [{ key: "logo", value: function logo() { - var logo = [React.createElement("img", { src: "images/browsers.svg", style: { maxWidth: "3rem" } }), React.createElement("h2", null, "Tab Manager Plus ", "5.1.3")]; + var logo = [React.createElement("img", { src: "images/browsers.svg", style: { maxWidth: "3rem" } }), React.createElement("h2", null, "Tab Manager Plus ", "5.1.4")]; return ( React.createElement("div", { className: "logo-options" }, diff --git a/outlib/background.js b/outlib/background.js index 05b97576..a26c27c7 100644 --- a/outlib/background.js +++ b/outlib/background.js @@ -2,19 +2,43 @@ - function _callee(tabs, isIncognito) {var first, t, i, w, tab;return regeneratorRuntime.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0: - first = tabs.shift(); + function _callee(tabs, isIncognito) {var pinnedIndex, firstTab, t, i, firstPinned, w, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, oldTabId, oldTab, tabPinned, movedTabs, newTab;return regeneratorRuntime.wrap(function _callee$(_context) {while (1) {switch (_context.prev = _context.next) {case 0: + + pinnedIndex = 0; + firstTab = tabs.shift(); t = []; for (i = 0; i < tabs.length; i++) { t.push(tabs[i].id); - };_context.next = 6;return ( - browser.windows.create({ tabId: first.id, incognito: !!isIncognito }));case 6:w = _context.sent;_context.next = 9;return ( - browser.tabs.update(first.id, { pinned: first.pinned }));case 9:if (!( - t.length > 0)) {_context.next = 15;break;}_context.next = 12;return ( - browser.tabs.move(t, { windowId: w.id, index: -1 }));case 12:tab = _context.sent;_context.next = 15;return ( - browser.tabs.update(tab.id, { pinned: tab.pinned }));case 15:_context.next = 17;return ( + }; + + firstPinned = firstTab.pinned;_context.next = 8;return ( + browser.windows.create({ tabId: firstTab.id, incognito: !!isIncognito }));case 8:w = _context.sent;if (! + firstPinned) {_context.next = 13;break;}_context.next = 12;return ( + browser.tabs.update(w.tabs[0].id, { pinned: firstPinned }));case 12: + pinnedIndex++;case 13:if (!( + + + t.length > 0)) {_context.next = 60;break;} + i = 0;_iteratorNormalCompletion2 = true;_didIteratorError2 = false;_iteratorError2 = undefined;_context.prev = 18;_iterator2 = + t[Symbol.iterator]();case 20:if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {_context.next = 45;break;}oldTabId = _step2.value; + i++;_context.next = 25;return ( + browser.tabs.get(oldTabId));case 25:oldTab = _context.sent; + tabPinned = oldTab.pinned; + movedTabs = [];if ( + tabPinned) {_context.next = 34;break;}_context.next = 31;return ( + browser.tabs.move(oldTabId, { windowId: w.id, index: -1 }));case 31:movedTabs = _context.sent;_context.next = 37;break;case 34:_context.next = 36;return ( + + browser.tabs.move(oldTabId, { windowId: w.id, index: pinnedIndex++ }));case 36:movedTabs = _context.sent;case 37:if (!( + + movedTabs.length > 0)) {_context.next = 42;break;} + newTab = movedTabs[0];if (! + tabPinned) {_context.next = 42;break;}_context.next = 42;return ( + browser.tabs.update(newTab.id, { pinned: tabPinned }));case 42:_iteratorNormalCompletion2 = true;_context.next = 20;break;case 45:_context.next = 51;break;case 47:_context.prev = 47;_context.t0 = _context["catch"](18);_didIteratorError2 = true;_iteratorError2 = _context.t0;case 51:_context.prev = 51;_context.prev = 52;if (!_iteratorNormalCompletion2 && _iterator2.return) {_iterator2.return();}case 54:_context.prev = 54;if (!_didIteratorError2) {_context.next = 57;break;}throw _iteratorError2;case 57:return _context.finish(54);case 58:return _context.finish(51);case 59: + + + ;case 60:_context.next = 62;return ( - browser.windows.update(w.id, { focused: true }));case 17:case "end":return _context.stop();}}}, _callee, this);}));return function createWindowWithTabs(_x, _x2) {return _ref.apply(this, arguments);};}();var focusOnTabAndWindow = function () {var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark( + browser.windows.update(w.id, { focused: true }));case 62:case "end":return _context.stop();}}}, _callee, this, [[18, 47, 51, 59], [52,, 54, 58]]);}));return function createWindowWithTabs(_x, _x2) {return _ref.apply(this, arguments);};}();var focusOnTabAndWindow = function () {var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark( function _callee2(tab) {return regeneratorRuntime.wrap(function _callee2$(_context2) {while (1) {switch (_context2.prev = _context2.next) {case 0:_context2.next = 2;return ( @@ -168,13 +192,13 @@ } catch (e) { openInOwnTab = false; } - console.log(openInOwnTab);if (! - openInOwnTab) {_context7.next = 11;break;}_context7.next = 7;return ( - browser.browserAction.setPopup({ popup: "" }));case 7:_context7.next = 9;return ( - browser.browserAction.onClicked.addListener(openAsOwnTab));case 9:_context7.next = 15;break;case 11:_context7.next = 13;return ( + console.log(openInOwnTab);_context7.next = 6;return ( + browser.browserAction.onClicked.removeListener(openAsOwnTab));case 6:if (! + openInOwnTab) {_context7.next = 13;break;}_context7.next = 9;return ( + browser.browserAction.setPopup({ popup: "" }));case 9:_context7.next = 11;return ( + browser.browserAction.onClicked.addListener(openAsOwnTab));case 11:_context7.next = 15;break;case 13:_context7.next = 15;return ( - browser.browserAction.setPopup({ popup: "popup.html?popup=true" }));case 13:_context7.next = 15;return ( - browser.browserAction.onClicked.removeListener(openAsOwnTab));case 15:case "end":return _context7.stop();}}}, _callee7, this);}));return function setupPopup() {return _ref7.apply(this, arguments);};}();var setupListeners = function () {var _ref8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark( + browser.browserAction.setPopup({ popup: "popup.html?popup=true" }));case 15:case "end":return _context7.stop();}}}, _callee7, this);}));return function setupPopup() {return _ref7.apply(this, arguments);};}();var setupListeners = function () {var _ref8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark( diff --git a/package.json b/package.json index dde23357..700e6214 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tab-manager", - "version": "5.1.3", + "version": "5.1.4", "description": "This is an extended version of the old Tab Manager Google Chrome extension. Should work on both Chrome and Firefox. Malware free, with a new view type and many new features.", "main": "index.js", "directories": { @@ -23,8 +23,11 @@ "homepage": "https://github.com/stefanXO/Tab-Manager#readme", "devDependencies": { "babel-cli": "^6.26.0", + "babel-core": "^6.26.3", "babel-plugin-inline-replace-variables": "^1.3.1", + "babel-plugin-transform-async-to-generator": "^6.24.1", "babel-plugin-transform-react-createelement-to-jsx": "^1.1.0", + "babel-preset-browser": "^1.0.1", "babel-preset-es2015": "^6.24.1", "babel-preset-es2017": "^6.24.1", "babel-preset-react": "^6.24.1", diff --git a/readme.md b/readme.md index 0a51266a..1bb83aff 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# Tab Manager Plus 5.1.3 +# Tab Manager Plus 5.1.4 ##### Search through your tabs instantly, save windows for later, limit open tabs per window - and many more.