supermemory icon indicating copy to clipboard operation
supermemory copied to clipboard

redirect when the extension button is clicked

Open MarkAppprogrammer opened this issue 1 year ago • 4 comments

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 avatar Sep 26 '24 05:09 MarkAppprogrammer

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

MarkAppprogrammer avatar Sep 26 '24 05:09 MarkAppprogrammer

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

Dhravya avatar Sep 26 '24 18:09 Dhravya

🔍 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

kaizen-bot[bot] avatar Sep 27 '24 06:09 kaizen-bot[bot]

@Dhravya Are we still going to close this PR?

MarkAppprogrammer avatar Oct 03 '24 07:10 MarkAppprogrammer