Init Chrome extension
Anirudh Oppiliappan x@icyphox.sh
Thu, 16 Sep 2021 21:00:14 +0530
7 files changed,
37 insertions(+),
0 deletions(-)
A
chrome/forlater.js
@@ -0,0 +1,15 @@
+function saveForLater(info, tab) { + const tabURL = tab.url + const mailto = `mailto:save@forlater.email?&body=${tabURL}` + chrome.tabs.update({ + url: mailto, + }) +} + +chrome.action.onClicked.addListener(saveForLater) +chrome.contextMenus.create({ + 'title': "Send page to forlater", + 'contexts': ['all'], + 'id': 'save forlater menu' +}) +chrome.contextMenus.onClicked.addListener(saveForLater)
A
chrome/manifest.json
@@ -0,0 +1,17 @@
+{ + "name": "save forlater", + "description": "Save a page via forlater", + "version": "1.0", + "manifest_version": 3, + "background": { + "service_worker": "forlater.js" + }, + "permissions": ["activeTab", "contextMenus", "background"], + "action": { + "default_icon": "icons/logo-48.png", + "default_title": "save forlater" + }, + "icons": { + "48": "icons/logo-48.png" + } +}
A
readme
@@ -0,0 +1,5 @@
+save-forlater +------------- + +Firefox and Chrome extensions to save a page via forlater. Check the +releases page.