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

[idea] Publish a Chrome extension for opening links in smry #6

Open
vfmatzkin opened this issue May 28, 2024 · 1 comment
Open

[idea] Publish a Chrome extension for opening links in smry #6

vfmatzkin opened this issue May 28, 2024 · 1 comment

Comments

@vfmatzkin
Copy link

You can build a very simple extension that would open the desired link into a new tab in smry with this extension:

background.js

chrome.runtime.onInstalled.addListener(() => {
 chrome.contextMenus.create({
   id: "smryAI",
   title: "Open with SMRY.AI",
   contexts: ["link"]
 });
});

chrome.contextMenus.onClicked.addListener((info, tab) => {
 if (info.menuItemId === "smryAI") {
   const url = `https://www.smry.ai/proxy?url=${encodeURIComponent(info.linkUrl)}`;
   chrome.tabs.create({ url });
 }
});

manifest.json

{
  "manifest_version": 3,
  "name": "Open with SMRY.AI",
  "version": "1.0",
  "description": "Open selected URL with SMRY.AI",
  "permissions": [
    "contextMenus",
    "tabs"
  ],
  "background": {
    "service_worker": "background.js"
  },
  "icons": {
    "16": "icon16.png",
    "48": "icon48.png",
    "128": "icon128.png"
  }
}

This way you could just go straight to the smry website with two clicks:
image

Thanks for your service!

Cheers!

@Norjak
Copy link

Norjak commented Aug 20, 2024

+1 it would be good.

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

No branches or pull requests

2 participants