This repository has been archived by the owner on Mar 15, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add debug mode, fix Mint update bug (#23)
- Fixed race condition in Mint update script where save callback could be called before it was initialized. (Fixes #22) - Added a debug mode to facilitate debugging and support. This mode will log to either the background script or the console on the pages where content scripts are running.
- Loading branch information
Showing
17 changed files
with
221 additions
and
141 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
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,19 +1,15 @@ | ||
import { log } from "../utilities/logging"; | ||
const logConfig = { | ||
type: "background", | ||
name: "Update/Install Listener", | ||
}; | ||
import { Debug } from "../utilities/debug"; | ||
|
||
log(logConfig, "initialized"); | ||
const debug = new Debug("background", "Update/Install Listener"); | ||
|
||
chrome.runtime.onInstalled.addListener((details) => { | ||
if (details.reason === "install") { | ||
// When the extension is installed | ||
log(logConfig, "install detected"); | ||
debug.log("install detected"); | ||
window.open(chrome.extension.getURL("html/welcome.html"), "_blank"); | ||
} else if (details.reason === "update") { | ||
// When the extension is updated | ||
log(logConfig, "update detected"); | ||
debug.log("update detected"); | ||
chrome.storage.sync.set({ updated: true }); | ||
} | ||
}); |
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
Oops, something went wrong.