Skip to content

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

@vfmatzkin

Description

@vfmatzkin

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions