all repos — save-forlater @ 05a29e501b25cb2937446bc3ea3ff3a842d572b9

Browser add-ons for sending a page via forlater.email

Init Firefox plugin
Anirudh Oppiliappan x@icyphox.sh
Thu, 16 Sep 2021 18:40:12 +0530
commit

05a29e501b25cb2937446bc3ea3ff3a842d572b9

3 files changed, 35 insertions(+), 0 deletions(-)

jump to
A forlater.js

@@ -0,0 +1,16 @@

+function saveForLater(tab) { + const tabURL = tab.url + const mailto = `mailto:save@forlater.email?&body=${tabURL}` + browser.tabs.update({ + url: mailto, + }) +} + +browser.browserAction.onClicked.addListener(saveForLater) +browser.contextMenus.create({ + 'title': "Send page to forlater", + 'contexts': ['all'], + 'onclick': function(info, tab) { + saveForLater(tab); + } +});
A manifest.json

@@ -0,0 +1,19 @@

+{ + "manifest_version": 2, + "name": "save forlater", + "version": "1.0", + + "description": "Generates a mailto link to save pages via forlater.email", + + "icons": { + "48": "icons/logo-48.png" + }, + "permissions": [ "activeTab", "contextMenus" ], + "browser_action": { + "default_icon": "icons/logo-48.png", + "default_title": "save forlater" + }, + "background": { + "scripts": ["forlater.js"] + } +}