Skip to content

Commit

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

commit ee2c69a
Author: John Dunning <[email protected]>
Date:   Sat Aug 31 17:03:51 2019 -0700

    Update version to 1.1.1

    Update releases, privacy policy and main home page.
    Don't focus current window when opening closed tab.
    Clean up .ignore file.
    Remove closed.svg, which is no longer used.

commit 7879a9b
Merge: 399ead1 07610f7
Author: John Dunning <[email protected]>
Date:   Sat Aug 31 14:12:56 2019 -0700

    Merge branch 'bug/mac-focus-issue' into dev

commit 07610f7
Author: John Dunning <[email protected]>
Date:   Sat Aug 31 14:07:59 2019 -0700

    Change built test extension name

commit adbc45a
Author: John Dunning <[email protected]>
Date:   Sat Aug 24 17:18:26 2019 -0700

    Fix issue #5

    When focusing a tab, focus the window before focusing the tab, which seems to avoid focus issues on macOS.
    In popups, call promisified update() methods in a chain instead of the non-callback versions.
    Remove code for opening options page after upgrade to 1.1.0.
    Check for error.lineno when tracking an exception, so we don't send undefineds.

commit 399ead1
Author: John Dunning <[email protected]>
Date:   Fri Aug 23 18:44:15 2019 -0700

    Merge pull request #7 from haokuixi/master

    Fix focus issue
  • Loading branch information
fwextensions committed Sep 1, 2019
1 parent 0d307bd commit 46f923b
Show file tree
Hide file tree
Showing 12 changed files with 44 additions and 39 deletions.
8 changes: 2 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
/node_modules
/build/build.txt
/build/rjs
/build/out
/keys
/test
/To do.md
/release
/.idea
/node_modules
/package-lock.json
/release
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ module.exports = function(grunt) {
manifest.content_security_policy = manifest.content_security_policy.replace("'unsafe-eval' ", "");

manifest.browser_action.default_title = manifest.name =
`${manifest.short_name} OUT ${new Date().toLocaleString()}`;
`${manifest.short_name} BUILD ${new Date().toLocaleString()}`;

grunt.file.write(buildManifestPath, JSON.stringify(manifest, null, "\t"));
});
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ When first installed, *QuicKey* asks for these permissions:

*QuicKey* uses this permission to let you search the titles and URLs of your bookmarked pages. It will never change your bookmarks.

*QuicKey* can't access or manipulate the content of any pages you visit and doesn't transmit any information other than some anonymized Google Analytics usage metrics.
*QuicKey* can't access or manipulate the content of any pages you visit and doesn't transmit any information other than some anonymized diagnostic data.

If you right-click the *QuicKey* icon on the toolbar, there's a message saying *Can't read or change site's data*, which is a bit misleading, since it can't read or change *any* site's data, not just the current one.

Expand Down
4 changes: 3 additions & 1 deletion docs/privacy/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ When first installed, *QuicKey* asks for these permissions:

*QuicKey* uses this permission to let you search the titles and URLs of your bookmarked pages. It will never change your bookmarks.

*QuicKey* does not request the *Read and modify all your data on all websites you visit* permission that many extensions require, so it can't read or modify the content of any pages you visit. It doesn't transmit any information other than some anonymized Google Analytics metrics.
*QuicKey* does not request the *Read and modify all your data on all websites you visit* permission that many extensions require, so it can't read or modify the content of any pages you visit. It doesn't transmit any information other than some anonymized diagnostic data. It never sends any information about your browser usage.

If you right-click the *QuicKey* icon on the toolbar, there's a message saying *Can't read or change site's data*, which is a bit misleading, since it can't read or change *any* site's data, not just the current one.

The complete *QuicKey* source code is available for inspection on [GitHub](https://github.com/fwextensions/QuicKey).

Expand Down
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.1.1 - 2019-08-31

### Fixed

* On some versions of macOS, using the menu to focus a tab would sometimes put keyboard focus on the first tab in the window, instead of the selected tab.


## 1.1.0 - 2019-06-09

### Added
Expand Down
1 change: 0 additions & 1 deletion src/img/closed.svg

This file was deleted.

11 changes: 0 additions & 11 deletions src/js/background/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,16 +321,5 @@ require([
.then(() => gInstalledPromise)
.then(({reason, previousVersion}) => {
backgroundTracker.event("extension", reason, previousVersion);

if (reason == "update" && !lastUsedVersion) {
// open the options page with an update message for people
// who had previously installed QuicKey. pass an update
// param to the page to make it show an upgrade message.
chrome.tabs.create({
url: chrome.extension.getURL("options.html?update")
});
backgroundTracker.event("extension", "open-options");
DEBUG && console.log("== updated and opened options");
}
});
});
5 changes: 2 additions & 3 deletions src/js/background/page-trackers.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ define([


return shared("trackers", function() {
// create a separate tracker for the background and popup pages, so
// the events get tracked on the right page. pass true to not do an
// automatic pageview on creation in this module.
// create a separate tracker for the background, popup and options
// pages, so the events get tracked with the right URL
return {
background: new Tracker({
id: TrackerID,
Expand Down
18 changes: 11 additions & 7 deletions src/js/background/recent-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,16 +414,20 @@ DEBUG && console.log("=== updateAll");
DEBUG && console.log("navigate previousTabIndex", previousTabID, previousTabIndex, titleOrURL(data.tabsByID[previousTabID]));
newData.previousTabIndex = previousTabIndex;

return cp.tabs.update(previousTabID, { active: true })
// we don't start the promise chain with windows.update
// because we want to call it in a function so that if the
// previous tab doesn't exist, it'll throw an exception and
// we can handle it in the catch() below, instead of having
// to duplicate the error handling code outside the chain.
return Promise.resolve()
.then(function() {
// if the previous tab's data is not in tabsByID,
// this throws an exception that will be caught
// this will throw an exception that will be caught
// below and the bad tab ID will be removed
const previousWindowID = data.tabsByID[previousTabID].windowId;

if (previousWindowID != chrome.windows.WINDOW_ID_CURRENT) {
return cp.windows.update(previousWindowID, { focused: true });
}
return cp.windows.update(data.tabsByID[previousTabID].windowId, { focused: true })
})
.then(function() {
return cp.tabs.update(previousTabID, { active: true });
})
.catch(function(error) {
// we got an error either because the previous
Expand Down
6 changes: 5 additions & 1 deletion src/js/background/tracker.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ define(function() {
// reduce the noise of the protocol repeating in every URL
description = error.stack.replace(PathPattern, "").slice(0, MaxStackLength);
} else if (error.message) {
description = `${error.message}\n${error.lineno}, ${error.colno}: ${error.filename}`;
const location = error.lineno
? `\n${error.lineno}, ${error.colno}: ${error.filename}`
: "";

description = `${error.message}${location}`;
}

this.send("exception", {
Expand Down
17 changes: 11 additions & 6 deletions src/js/popup/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,17 @@ define("popup/app", [
event = "unsuspend";
}

// make sure that tab's window comes forward
chrome.windows.update(tab.windowId, { focused: true });

// switch to the selected tab
chrome.tabs.update(tab.id, updateData);
// bring the tab's window forward *before* focusing the tab,
// since activating the window can sometimes put keyboard
// focus on the very first tab button on macOS 12.14 (could
// never repro on 12.12). then focus the tab, which should
// fix any focus issues.
cp.windows.update(tab.windowId, { focused: true })
.then(() => cp.tabs.update(tab.id, updateData))
.catch(error => {
this.props.tracker.exception(error);
log(error);
});

this.props.tracker.event(category, event,
queryLength ? queryLength : undefined);
Expand Down Expand Up @@ -336,7 +342,6 @@ define("popup/app", [
if (this.mode == "tabs") {
if (item.sessionId) {
// this is a closed tab, so restore it
chrome.windows.update(chrome.windows.WINDOW_ID_CURRENT, { focused: true });
chrome.sessions.restore(item.sessionId);
this.props.tracker.event("tabs", "restore");
} else {
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.1.0",
"version": "1.1.1",
"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 46f923b

Please sign in to comment.