Skip to content

Commit

Permalink
Release v1.3.0
Browse files Browse the repository at this point in the history
Update store description text with new /h behavior.

Squashed commit of the following:

commit 151a189667b7b333ecb11880c8e55087d79536ee
Author: John Dunning <[email protected]>
Date:   Sun Dec 15 18:52:52 2019 -0800

    Update version to 1.3.0

    Update releases/index.md with changes and new features.

commit 8982b7354f65a16f0be9ae6526d598919f017c38
Author: John Dunning <[email protected]>
Date:   Sun Dec 15 17:28:31 2019 -0800

    Update the last tab's lastVisit when a tab is added penultimately

    Simplify the background.js so it doesn't have to re-add the last tab just to update its lastVisit when an inactive tab is opened.

commit ff28f183f00f0f7b8ff60fb1f4c013d89e55c680
Author: John Dunning <[email protected]>
Date:   Sun Dec 15 16:50:33 2019 -0800

    Merge branch 'feature/handle-ctrl-click' into dev

commit c943d89b47dc8eb3647d2eb08fbb28f46c8f847f
Author: John Dunning <[email protected]>
Date:   Sun Dec 15 16:47:42 2019 -0800

    Fix MRU ordering after opening multiple tabs from a bookmark folder

    In recentTabs.add(), always update lastVisit, even if the current tab is being re-added.
    Re-add the current tab when an inactive tab is opened.

commit 96ea151a50223b0c27aae15e7ea868b857983d42
Author: John Dunning <[email protected]>
Date:   Sat Dec 14 18:14:30 2019 -0800

    ES6ify recent-tabs.js

commit 8a5f9f0329ed34ba6e2df258f8f365ce0345b35c
Author: John Dunning <[email protected]>
Date:   Sat Nov 16 18:36:25 2019 -0800

    Tweak comment

commit 567c9e937c00f1437483cccc3feeff425b333344
Author: John Dunning <[email protected]>
Date:   Sun Nov 10 19:59:56 2019 -0800

    Add tabs created in an inactive state to the recent list

    If you ctrl-click a tab, you can then press ctrl-Z to immediately switch to it, even though you haven't actually visited it yet.
    Add a penultimately param to recentTabs.add().

commit 6cd10d186a188ec6c334d36f758ed936a8d11c90
Author: John Dunning <[email protected]>
Date:   Sun Dec 8 19:19:31 2019 -0800

    Fix moving tabs from same window to the left of the current one

commit f1fedab740e60b49d116ef9c296807697d0e2b61
Author: John Dunning <[email protected]>
Date:   Sun Dec 8 18:43:16 2019 -0800

    Merge branch 'bug/missing-shortcut-key' into dev

commit bbab3d706c7b9a5843cae2a6e22b19fdf9f41408
Author: John Dunning <[email protected]>
Date:   Sun Dec 8 18:23:32 2019 -0800

    Allow more keys to be used in shortcuts

    Allow function keys to be used alone as a shortcut.
    Clean up handling of tab and enter to simplify key-constants.js.
    Prevent default on keydown repeats, so user can use keys like page down without scrolling the page.
    Add width4 class for "backspace" key.
    ES6ify some things.

commit 212ce3209ca47bd0e0c5686fa75107abe5ae6a52
Author: John Dunning <[email protected]>
Date:   Sat Dec 7 18:43:57 2019 -0800

    Refactor how Chrome shortcuts are returned on settings

    Don't return disabled: true on the Chrome shortcuts and let OptionsAppContainer add it.
    Handle null errors passed to tracker.exception().
    Clean up Shortcut component.

commit a23b56841f8d39961ca8c6c82690415e7420d531
Author: John Dunning <[email protected]>
Date:   Fri Dec 6 18:25:05 2019 -0800

    Use default modifier key when Chrome doesn't return one

    Handle case where Chrome doesn't return the browser action shortcut and use a platform-specific modifier, so the user can still navigate the MRU list with it.

commit 3985ad76ff7e894f9af78436d15eea12dd5cf34d
Author: John Dunning <[email protected]>
Date:   Sun Dec 1 19:41:53 2019 -0800

    Merge remote-tracking branch 'remotes/origin/feature/other-window-icon' into dev

commit e0a04df7dfb5a54630470a090d0b7acbe988a8fc
Author: John Dunning <[email protected]>
Date:   Sat Nov 30 16:02:54 2019 -0800

    Update minimum Chrome version to 55

    That's the first version with async/await support.

commit 8b19f8c60f7a930e1496a1c416d6ede8d68ba990
Author: John Dunning <[email protected]>
Date:   Fri Nov 29 21:48:26 2019 -0800

    Fix rapid toggles navigating to the wrong tab

    Make sure the last toggle promise chain is resolved before toggling again, so that the recent tabs array doesn't get out of sync.

commit 88b77ff88336abf4abd3719d0a8ece70af3804de
Author: John Dunning <[email protected]>
Date:   Fri Nov 22 19:40:29 2019 -0800

    Update docs about showing history items

    Add a badge to options button, which is currently hidden.

commit d5c12d8d1d4525b862af1a8ef341d471fd6bf869
Author: John Dunning <[email protected]>
Date:   Fri Nov 22 18:26:28 2019 -0800

    Show history items in recency order when /h is typed

commit f4b94a165237cdd99de8ba0e372e1cf3c1184c4e
Author: John Dunning <[email protected]>
Date:   Sun Nov 17 19:20:16 2019 -0800

    Default markTabsInOtherWindows to false when > 3 windows

    In quickey-storage.js, use async updaters, since getting DefaultData now requires a promise.
    Make getDefaultData(), validateUpdate() async function.
    Support async updaters in storage.js.
    Only log validation errors in DEBUG mode.

commit 60a65952acba79e314f1f62ea2622b032e9d3d30
Author: John Dunning <[email protected]>
Date:   Sun Nov 10 18:44:51 2019 -0800

    Lower the minimum score for showing results to .02

    Also show at least 4 items.
    Tweak checkbox labels so the blank area after the text isn't clickable.

commit 2e51d651540d3d12b68eb0cbcec1c1443a045ac2
Author: John Dunning <[email protected]>
Date:   Sat Nov 9 20:08:14 2019 -0800

    Fix extraneous command in ctrl-tab/index.md

commit cec6b47a22566e04c306cfe0e5e11a8483fe16a4
Author: John Dunning <[email protected]>
Date:   Sat Nov 9 19:30:35 2019 -0800

    Add tooltips to explain the badge icons on some tabs

    Specify a background-size on icons, since otherwise, they may get fuzzy.
    Log validation errors in storage.js.
    Remove unused params in recentTabs.navigate().
    Set a default count in recentTabs.print().
    Don't add the other-window class to closed tabs.

commit 5516f7a3f16a59fbe06962776ad3ccf50b4ac905
Author: John Dunning <[email protected]>
Date:   Sun Nov 3 19:33:26 2019 -0800

    Add option to show icon for tabs in other windows

    Update storageVersion to 7.
    Calculate the storage version by incrementing the highest updater key, so that we don't have to explicitly change the version after adding an updater.
    Add ability to show a subtitle to checkboxes and radio buttons.
    Use functional components for the icons on the Options page, instead of JSX objects.
    Remove UpgradeMessage from Options, which we're no longer using.
    Use destructuring to avoid having to use Control. to access the control components.
    Change differentWindow to otherWindow, to match the setting name.

commit d90e3ae1189fc5dad23f4eee8505fd35d38a12b5
Author: John Dunning <[email protected]>
Date:   Sat Nov 2 13:00:22 2019 -0700

    Add icon to tabs from other windows

    Show icon as long as it's not also incognito.
    Make the incognito icon a little lighter.
  • Loading branch information
fwextensions committed Dec 16, 2019
1 parent dc198b9 commit d387c6d
Show file tree
Hide file tree
Showing 31 changed files with 617 additions and 443 deletions.
2 changes: 2 additions & 0 deletions docs/chrome-store-description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ To find something in the last 2000 pages of your browser history, type "/h" in t

The same CTRL-ENTER (CMD-ENTER on macOS) and SHIFT-ENTER shortcuts will open the visited page in a new tab or window.

As soon as you type "/h", the pages from your history will be listed in order of recency, so you can get back to a page you had visited without having to remember its name.


★ The Great Suspender integration

Expand Down
1 change: 0 additions & 1 deletion docs/ctrl-tab/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Now you can press <b><kbd>ctrl</kbd><kbd>tab</kbd></b> to switch to the previous

Follow [steps 1 through 4](#option-1-1) from option 1 above.

{:start="5"}
5. Copy this block of code:

chrome.developerPrivate.updateExtensionCommand({
Expand Down
4 changes: 3 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ Opening *QuicKey* displays a list of the last 50 tabs you've visited, in order o

* **To switch between the two most recent tabs:**
* Press <b><kbd>alt</kbd><kbd>Z</kbd></b> (<b><kbd>ctrl</kbd><kbd>Z</kbd></b> on macOS).
* **Or:**
* **OR**
* Quickly double-press <b><kbd>alt</kbd><kbd>Q</kbd></b> (<b><kbd>ctrl</kbd><kbd>Q</kbd></b> on macOS).

<p style="margin-bottom: 0;">&nbsp;</p>
Expand Down Expand Up @@ -174,6 +174,8 @@ To find something in the last 2000 pages of your browser history, type <b><kbd>/

The same <b><kbd>ctrl</kbd><kbd>enter</kbd></b> (<b><kbd>cmd</kbd><kbd>enter</kbd></b> on macOS) and <b><kbd>shift</kbd><kbd>enter</kbd></b> shortcuts will open the visited page in a new tab or window.

As soon as you type <b><kbd>/</kbd><kbd>h</kbd><kbd>space</kbd></b>, the pages from your history will be listed in order of recency, so you can get back to a page you had visited without having to remember its name.


## <a href="https://chrome.google.com/webstore/detail/the-great-suspender/klbibkeccnjlkjkiokjodocebajanakg?hl=en"><img src="img/tgs-icon.png" style="height: 24px;"></a> The Great Suspender integration

Expand Down
23 changes: 23 additions & 0 deletions docs/releases/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,29 @@ comments: true
# Release history


## 1.3.0 - 2019-12-15

### Added

* New option to mark tabs that aren't in the current window with an icon. The setting defaults on if you have more than 3 windows open when the extension is installed.

* Typing <b><kbd>/</kbd><kbd>h</kbd></b> immediately shows the list of visited web pages, in recency order.

* Tabs that are opened via ctrl-click or by opening a folder of bookmarks are immediately added to the menu as recently-used tabs, so that you can then use <b><kbd>alt</kbd><kbd>Z</kbd></b> to toggle to a tab you just opened.

* Function keys and other special keys can be used as shortcuts.

### Changed

* The minimum version of Chrome is now 55.

### Fixed

* Holding down <b><kbd>alt</kbd><kbd>Z</kbd></b> to rapidly switch tabs could cause tabs other than the most recent two to be focused.

* Moving a tab from the same window to the left of the current tab would position it in the wrong place.


## 1.2.0 - 2019-10-12

### Added
Expand Down
11 changes: 10 additions & 1 deletion src/css/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ main {
position: relative;
padding-left: 1.7em;
line-height: 1.4em;
display: block;
display: inline-block;
}

/* don't use display: none so the control can still get focus */
Expand Down Expand Up @@ -251,6 +251,11 @@ main {
background: #7b7b7b;
}

.control .subtitle {
color: #666;
font-size: .9em;
}

.control-group {
margin: 1em 0 2em 0;
}
Expand Down Expand Up @@ -438,3 +443,7 @@ main {
.width3 {
width: 1.95em;
}

.width4 {
width: 3em;
}
48 changes: 34 additions & 14 deletions src/css/popup.css
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ input.search-box::-webkit-search-cancel-button:hover:active {
display: inline-block;
}

.options-button .badge {
width: 6px;
height: 6px;
top: 0;
right: 0;
border-radius: 50%;
background: #f33;
position: absolute;
display: none;
}

.options-button:hover {
background-color: #dcdcdc;
}
Expand Down Expand Up @@ -162,24 +173,12 @@ input.search-box::-webkit-search-cancel-button:hover:active {
background-color: #ebebeb;
}

.results-list-item.incognito {
background-image: url(/img/incognito.svg);
background-size: 16px 16px;
background-position: 6px 25px;
}

.results-list-item.closed {
background-image: url(/img/history.svg);
background-size: 16px 16px;
background-position: 5px 25px;
}

.results-list-item .favicon {
.results-list-item .favicon, .results-list-item .badge {
left: 6px;
top: 6px;
width: 16px;
height: 16px;
background-size: cover;
background-size: 16px 16px;
background-repeat: no-repeat;
position: absolute;
}
Expand All @@ -188,6 +187,27 @@ input.search-box::-webkit-search-cancel-button:hover:active {
opacity: 0.4;
}

.results-list-item .badge {
top: 25px;
display: none;
}

.results-list-item.incognito .badge {
background-image: url(/img/incognito.svg);
display: block;
}

.results-list-item.other-window .badge {
background-image: url(/img/window.svg);
display: block;
}

.results-list-item.closed .badge {
left: 5px; /* this icon looks better centered shifted left 1px */
background-image: url(/img/history.svg);
display: block;
}

.results-list-item div.title, .results-list-item div.url {
width: 100%;
height: 19px;
Expand Down
2 changes: 1 addition & 1 deletion src/img/incognito.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/img/window.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 28 additions & 12 deletions src/js/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ require([
const backgroundTracker = trackers.background;
let popupIsOpen = false;
let tabChangedFromToggle = false;
let lastTogglePromise = Promise.resolve();
let isNormalIcon = true;
let shortcutTimer;
let lastWindowID;
Expand Down Expand Up @@ -177,18 +178,22 @@ require([
// set tabChangedFromToggle so that addTab() doesn't invert the icon
tabChangedFromToggle = true;

// if there's a debounced addTab() call waiting, fire it now, so
// that when we navigate to the "previous" tab below, that'll be the
// tab the user started from when they began navigating backwards
// into the stack. otherwise, the debounced add would fire after we
// navigate, putting that tab on the top of the stack, even though a
// different tab was now active.
(addTab.execute() || Promise.resolve())
.then(() => {
recentTabs.toggle();
backgroundTracker.event("recents",
fromShortcut ? "toggle-shortcut" : "toggle");
});
// we have to wait for the last toggle promise chain to resolve before
// starting the next one. otherwise, if the toggle key is held down,
// the events fire faster than recentTabs.toggle() can keep up, so
// the tabIDs array isn't updated before the next navigation happens,
// and the wrong tab is navigated to.
lastTogglePromise = lastTogglePromise
// if there's a debounced addTab() call waiting, fire it now, so
// that when we navigate to the "previous" tab below, that'll be
// the tab the user started from when they began navigating
// backwards into the stack. otherwise, the debounced add would
// fire after we navigate, putting that tab on the top of the
// stack, even though a different tab was now active.
.then(() => addTab.execute())
.then(() => recentTabs.toggle())
.then(() => backgroundTracker.event("recents",
fromShortcut ? "toggle-shortcut" : "toggle"));
}


Expand Down Expand Up @@ -217,6 +222,17 @@ require([
});


chrome.tabs.onCreated.addListener(tab => {
if (!tab.active) {
// this tab was opened by ctrl-clicking a link or by opening
// all the tabs in a bookmark folder, so pass true to insert
// this tab in the penultimate position, which makes it the
// "most recent" tab
recentTabs.add(tab, true);
}
});


// debounce the handling of a removed tab since Chrome seems to trigger
// the event when shutting down, and we want to ignore those. hopefully,
// Chrome will finish quitting before this handler fires.
Expand Down
3 changes: 3 additions & 0 deletions src/js/background/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ define({
Clear: "clear",
Close: "close"
},
MarkTabsInOtherWindows: {
Key: "markTabsInOtherWindows"
},
IncludeClosedTabs: {
Key: "includeClosedTabs"
},
Expand Down
68 changes: 32 additions & 36 deletions src/js/background/get-chrome-shortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,47 +30,43 @@ define([
return function getShortcuts()
{
return cp.commands.getAll()
.then(function(commands) {
return commands.map(function(chromeShortcut) {
const shortcutText = (chromeShortcut.shortcut || "");
var shortcutKeys;
.then(commands => commands.map(chromeShortcut => {
const shortcutText = (chromeShortcut.shortcut || "");
let shortcutKeys;

if (!shortcutText.includes(ShortcutSeparator)) {
// annoyingly, Mac Chrome returns keyboard shortcuts
// using chars like ⇧⌘A instead of Shift+Cmd+A. so
// separate out the primary key name and then split the
// modifier keys into 1-char strings. they'll get
// converted via the KeyAliases lookup below.
const match = shortcutText.match(MacShortcutPattern);
if (!shortcutText.includes(ShortcutSeparator)) {
// annoyingly, Mac Chrome returns keyboard shortcuts
// using chars like ⇧⌘A instead of Shift+Cmd+A. so
// separate out the primary key name and then split the
// modifier keys into 1-char strings. they'll get
// converted via the KeyAliases lookup below.
const match = shortcutText.match(MacShortcutPattern);

if (match && match.length == 3) {
shortcutKeys = match[1].split("").concat(match[2]);
} else {
shortcutKeys = [""];
}
if (match && match.length == 3) {
shortcutKeys = match[1].split("").concat(match[2]);
} else {
shortcutKeys = shortcutText.split(ShortcutSeparator);
shortcutKeys = [""];
}
} else {
shortcutKeys = shortcutText.split(ShortcutSeparator);
}

// make the modifier strings lowercase, remove spaces from
// keys like "Page Up", and fix keys like "Right Arrow", to
// make the order conform to the code string in the key event
const shortcut = shortcutKeys
.map(function(key) {
return KeyAliases[key] || key;
})
.join(ShortcutSeparator)
.toLowerCase();
// make the modifier strings lowercase, remove spaces from
// keys like "Page Up", and fix keys like "Right Arrow", to
// make the order conform to the code string in the key event
const shortcut = shortcutKeys
.map(key => KeyAliases[key] || key)
.join(ShortcutSeparator)
.toLowerCase();

return {
// the shortcut for opening the menu doesn't have a
// description in the manifest
label: chromeShortcut.description || "Open the QuicKey menu",
id: chromeShortcut.name,
disabled: true,
shortcut: shortcut
};
});
});
return {
// the shortcut for opening the menu doesn't have a
// description in the manifest
label: chromeShortcut.description || "Open the QuicKey menu",
id: chromeShortcut.name,
shortcut
};
})
)
}
});
1 change: 1 addition & 0 deletions src/js/background/get-default-settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ define([
const DefaultSettings = {
[k.SpaceBehavior.Key]: k.SpaceBehavior.Select,
[k.EscBehavior.Key]: k.EscBehavior.Clear,
[k.MarkTabsInOtherWindows.Key]: true,
[k.IncludeClosedTabs.Key]: true,
[k.Shortcuts.Key]: {
mac: MacDefaults,
Expand Down
Loading

0 comments on commit d387c6d

Please sign in to comment.