Skip to content

Commit

Permalink
Merge pull request #9 from WesleyBranton/version-2.2
Browse files Browse the repository at this point in the history
Version 2.2
  • Loading branch information
WesleyBranton committed Jul 10, 2019
2 parents 55a4dd0 + 1cec489 commit d529952
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ To develop and test the extension, you need to open the "about:debugging" page i
Further documentation about developing Firefox extensions can be found [here](https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/Your_first_WebExtension).

## Release Notes
### Version 2.2
* **[FIXED]** Opening link in new tab no longer creates additional blank tab
* **[FIXED]** Created tab always appears next to the original tab

### Version 2.1
* **[FIXED]** Outlook now opens in a new tab
* **[FIXED]** The Outlook selection screen will not load if you have selected "Don't ask again"
Expand Down
17 changes: 14 additions & 3 deletions firefox/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,20 @@ async function openTab(requestDetails) {
var params = await getParameters(requestDetails.url);
var base = await getBase();
var link = base + params;
browser.tabs.create({
url:link
});
let tabInfo = await browser.tabs.get(requestDetails.tabId);

// Checks if the link is already in a new tab or if a new tab needs to be created
if (tabInfo.url == 'about:blank') {
browser.tabs.update(requestDetails.tabId, {
url:link
});
} else {
browser.tabs.create({
index:tabInfo.index + 1,
url:link
});
}

saveMessage({'code':'create-handler','msg':[link,params]})
return {cancel: true};
}
Expand Down
2 changes: 1 addition & 1 deletion firefox/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Outlook.com mailto",
"version": "2.1",
"version": "2.2",
"description": "Add Outlook.com as a default email provider for all mailto links.",
"author": "Wesley Branton",

Expand Down

0 comments on commit d529952

Please sign in to comment.