Skip to content

Commit

Permalink
Release v1.3.2
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit b046b2709e699f995b324b9031a68b62e5cbc633
Author: John Dunning <[email protected]>
Date:   Tue Jan 7 23:51:45 2020 -0800

    Update version to 1.3.2

    Update releases/index.md.
    Update TGS icon to the latest.

commit d291fb4a1731fd2b251bb22be66966246c1be6ab
Author: John Dunning <[email protected]>
Date:   Tue Jan 7 22:49:26 2020 -0800

    Tweak help button on options for Mac

    Make the ? light grey and then white on hover.

commit a477a87aa639afe5a644e31c24c26aa3f7f58d1a
Author: John Dunning <[email protected]>
Date:   Mon Jan 6 13:03:01 2020 -0800

    Pass the command to deleteItem() instead of relying on mode

    The query was getting sliced when deleting a closed tab because the command string defaulted to "/h ".
    When deleting a closed tab, pull the tab from recents in the callback so it's done before getMatchingItems() is called.
    Put the _.remove() calls for a history item into the callback.
  • Loading branch information
fwextensions committed Jan 11, 2020
1 parent 098abc2 commit 0de7167
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 21 deletions.
Binary file modified docs/img/tgs-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions docs/releases/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ comments: true
# Release history


## 1.3.2 - 2020-01-08

### Fixed

* The current search query is no longer modified when a closed tab is deleted.


## 1.3.1 - 2020-01-04

### Added
Expand Down
10 changes: 9 additions & 1 deletion src/css/options.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ main {
}

.help-button {
color: #fff;
color: #ccc;
font-size: .8em;
font-weight: bold;
line-height: 100%;
Expand All @@ -124,7 +124,15 @@ main {
float: right;
}

.mac .help-button {
font-size: .7em;
padding: .1em 0 0 .05em;
width: 1.2em;
height: 1.2em;
}

.help-button:hover {
color: #fff;
background: #000;
}

Expand Down
46 changes: 27 additions & 19 deletions src/js/popup/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,9 @@ define("popup/app", [

const deleteItem = (
deleteFunc,
command = "",
eventCategory = mode) =>
{
const command = mode == "bookmarks" ? BookmarksQuery : HistoryQuery;

deleteFunc(item);
_.pull(this[mode], item);

Expand All @@ -395,31 +394,40 @@ define("popup/app", [
} else {
// this is a closed tab that the user wants to
// delete, so pass a special event category
deleteItem(({url}) => chrome.history.deleteUrl({ url }),
"closed-tab");

// since this closed tab is also in the recents list,
// we have to pull it from there as well. we don't
// need to do that in the tab branch above because
// loadTabs() gets called, which re-inits recents.
_.pull(this.recents, item);
deleteItem(({url}) => {
// deleting the URL from history also deletes
// any session for that URL
chrome.history.deleteUrl({ url });

// since this closed tab is also in the recents
// list, we have to pull it from there as well.
// do it in this callback so that it's removed
// before getMatchingItems() is called. we
// don't need to do that in the tab branch above
// because the onTabRemoved handler calls
// loadTabs(), which re-inits recents.
_.pull(this.recents, item);
}, "", "closed-tab");

}
} else if (mode == "bookmarks") {
if (confirm(DeleteBookmarkConfirmation)) {
deleteItem(({id}) => chrome.bookmarks.remove(id));
deleteItem(({id}) => chrome.bookmarks.remove(id),
BookmarksQuery);
}
} else if (mode == "history") {
// we have to use originalURL to delete the history item,
// since it may have been a suspended page and we convert
// url to the unsuspended version
deleteItem(({originalURL}) =>
chrome.history.deleteUrl({ url: originalURL }));

// just in case this URL was also recently closed, remove
// it from the tabs and recents lists, since it will no
// longer be re-openable
_.remove(this.tabs, { url: item.originalURL });
_.remove(this.recents, { url: item.originalURL });
deleteItem(({originalURL: url}) => {
chrome.history.deleteUrl({ url });

// just in case this URL was also recently closed,
// remove it from the tabs and recents lists, since
// it will no longer be re-openable
_.remove(this.tabs, { url });
_.remove(this.recents, { url });
}, HistoryQuery);
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "QuicKey DEV",
"short_name": "QuicKey",
"version": "1.3.1",
"version": "1.3.2",
"description": "Add keyboard shortcuts to switch tabs with a Quicksilver-style search or a most recently used menu",
"author": "John Dunning",
"content_security_policy": "script-src 'self' 'unsafe-eval' https://www.google-analytics.com; object-src 'self'",
Expand Down

0 comments on commit 0de7167

Please sign in to comment.