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

redirect when the extension button is clicked #299

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MarkAppprogrammer
Copy link

@MarkAppprogrammer MarkAppprogrammer commented Sep 26, 2024

Extension Manifest Update

  • Purpose:
    Update the Chrome extension manifest to include new functionality.
  • Key Changes:
    • Added home.html file to handle extension popup behavior
    • Expanded web_accessible_resources to include content/* files
    • Added action configuration to set the default popup for the extension
  • Impact:
    The extension will now open the SuperMemory.ai home page when the user clicks the extension icon, providing a more seamless user experience.

✨ Generated with love by Kaizen ❤️

Original Description # Update Chrome Extension Manifest
  • **Purpose:
    **
    Update the Chrome extension manifest to include a default popup page.
  • Key Changes:
    • Added a new home.html file that redirects the user to the https://supermemory.ai/home URL.
    • Updated the manifest.json file to include an action section with a default_popup property pointing to the home.html file.
    • Added the necessary permissions for the extension to access the webRequest, storage, and contextMenus APIs, as well as all URLs.
  • **Impact:
    **
    This change will provide users with a default popup page when they click on the extension icon, which will redirect them to the SuperMemory.ai home page. This can improve the user experience and discoverability of the extension's functionality.

✨ Generated with love by Kaizen ❤️

Original Description A simple redirect when the extension button is clicked to make it easier to access the home page and to ask supermemory

@MarkAppprogrammer
Copy link
Author

The code for host permissions was the same as before (refer to line 27 of the previous version)

@Dhravya
Copy link
Collaborator

Dhravya commented Sep 26, 2024

Hi! Thank you so much for this!!!

This works great, but I found an unrelated issue that we can just add to this PR.

Open chrome console on any website ->

#supermemory-extension-host {
	position: fixed;
	bottom: 0;
	right: 0;
	z-index: 99999;
}

this resource is blocked because of web_accessible_resource policy

fixed the #supermemory-extension-host and added curly brackets for "action"
Copy link
Contributor

kaizen-bot bot commented Sep 27, 2024

🔍 Code Review Summary

Attention Required: This push has potential issues. 🚨

Overview

  • Total Feedbacks: 1 (Critical: 1, Refinements: 0)
  • Files Affected: 1
  • Code Quality: [█████████████████░░░] 85% (Good)

🚨 Critical Issues

security (1 issues)

1. Excessive permissions in manifest.json


📁 File: apps/extension/manifest.json
🔍 Reasoning:
Using '<all_urls>' for 'host_permissions' grants the extension access to all URLs, which can be a security risk if not necessary.

💡 Solution:
Restrict 'host_permissions' to only the necessary URLs.

Current Code:

"host_permissions":["<all_urls>"]

Suggested Code:

"host_permissions":["https://specific-domain.com/*"]

✨ Generated with love by Kaizen ❤️

Useful Commands
  • Feedback: Reply with !feedback [your message]
  • Ask PR: Reply with !ask-pr [your question]
  • Review: Reply with !review
  • Explain: Reply with !explain [issue number] for more details on a specific issue
  • Ignore: Reply with !ignore [issue number] to mark an issue as false positive
  • Update Tests: Reply with !unittest to create a PR with test changes

@@ -19,10 +19,16 @@
},
"web_accessible_resources": [
Copy link
Contributor

Choose a reason for hiding this comment

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

Comment: Excessive permissions in manifest.json

Solution: Restrict 'host_permissions' to only the necessary URLs.

Suggested change
"web_accessible_resources": [
"host_permissions":["https://specific-domain.com/*"]

Copy link
Author

Choose a reason for hiding this comment

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

The existing code allows for ["<all_urls>"] not limited to a specific domain.

@MarkAppprogrammer
Copy link
Author

@Dhravya Are we still going to close this PR?

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.

2 participants