-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from wsg-ariadne/v0.1.2
v0.1.2
- Loading branch information
Showing
19 changed files
with
262 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
import messageListener from './message'; | ||
import tabChangeListener from './tabChange'; | ||
import tabUrlChangeListener from './tabUrlChange'; | ||
import tabCloseListener from './tabClose'; | ||
import tabUpdateListener from './tabUpdate'; | ||
|
||
export { | ||
messageListener, | ||
tabChangeListener, | ||
tabUrlChangeListener | ||
tabCloseListener, | ||
tabUpdateListener | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { getTransaction, deleteTransaction } from '../browser/storage'; | ||
|
||
export default (tabId, _) => { | ||
console.log('listeners/tabClose: Tab closed', tabId); | ||
|
||
// Delete badge state and Dionysus stats | ||
deleteTransaction('badgeStates', tabId); | ||
deleteTransaction('stats', tabId); | ||
|
||
// Get URL of closed tab | ||
getTransaction('tabUrls', tabId) | ||
.then((url) => { | ||
// Delete Calliope and Janus results | ||
deleteTransaction('calliope', url) | ||
.catch((err) => console.log('listeners/tabClose: No Calliope results to delete', err)); | ||
deleteTransaction('janus', url) | ||
.catch((err) => console.log('listeners/tabClose: No Janus results to delete', err)); | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { getStats } from "../api/stats"; | ||
import { setTransaction } from "../browser/storage"; | ||
|
||
export default (tabId, changeInfo, _) => { | ||
if (changeInfo.url) { | ||
console.log('listeners/tabUpdate: Tab ' + tabId + ' changed to', changeInfo.url); | ||
|
||
// Save URL to IndexedDB | ||
setTransaction('tabUrls', { tabId, url: changeInfo.url }); | ||
|
||
// Request fresh stats if not a chrome:// URL | ||
if (changeInfo.url.startsWith('chrome://')) { | ||
return; | ||
} | ||
getStats(changeInfo.url, () => {}, () => {}, false); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.