Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Chrome Extension Manifest v3 #20

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

0xdevalias
Copy link
Owner

@0xdevalias 0xdevalias commented Aug 23, 2024

For current status/plans/etc, refer to that issue; for example, from this comment:

@0xdevalias 0xdevalias requested a review from Copilot January 28, 2025 08:24
@0xdevalias 0xdevalias marked this pull request as ready for review January 29, 2025 02:37
@0xdevalias 0xdevalias requested review from Copilot and removed request for Copilot January 29, 2025 02:38
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 11 out of 20 changed files in this pull request and generated 2 comments.

Files not reviewed (9)
  • _locales/en/messages.json: Language not supported
  • manifest.json: Language not supported
  • scripts/build: Language not supported
  • scripts/clean: Language not supported
  • scripts/optimize-icons: Language not supported
  • src/bg/background.html: Language not supported
  • TODO.md: Evaluated as low risk
  • js/chromeExtensionApiAbstractions.js: Evaluated as low risk
  • js/googleAnalytics.js: Evaluated as low risk
Comments suppressed due to low confidence (2)

src/google-analytics.js:121

  • Ensure that the error object is a plain object before spreading it.
...error

src/google-analytics.js:103

  • Handle network errors more gracefully in the fireEvent function.
console.error('Google Analytics request failed with an exception', e);

*/
export async function setSettings(updater) {
const currentSettings = await getSettings();
const newSettings = updater(currentSettings);
Copy link
Preview

Copilot AI Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a check to ensure that newSettings is not null or undefined before setting it in storage.

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
// Create and store a new session
sessionData = {
session_id: currentTimeInMs.toString(),
timestamp: currentTimeInMs.toString()
Copy link
Preview

Copilot AI Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The timestamp should be stored as a number instead of a string.

Suggested change
timestamp: currentTimeInMs.toString()
timestamp: currentTimeInMs

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
Copy link
Owner Author

@0xdevalias 0xdevalias Jan 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const currentTimeInMs = Date.now(); contains a number, not a Date object; so calling .toString() on it isn't going to store the Date as a formatted string..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update to Chrome Extension Manifest v3
1 participant