From 797b2435802323c03b5b5552da4d0657fc011bf7 Mon Sep 17 00:00:00 2001 From: Maddison Hellstrom Date: Sat, 25 Apr 2020 20:38:19 -0700 Subject: [PATCH] [source/keys:feat] subscribe to rss w/feedrabbit --- actions.js | 6 ++++++ keys.js | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/actions.js b/actions.js index 74d385d..f0b0b2a 100644 --- a/actions.js +++ b/actions.js @@ -69,6 +69,12 @@ const outlineUrl = "https://outline.com/" actions.showOutline = ({ href = util.getCurrentLocation("href") } = {}) => () => actions.openLink(`${outlineUrl}${href}`, { newTab: true })() +// Site/Page Actions +const rssSubscribeUrl = "https://feedrabbit.com/subscriptions/new?url=" + +actions.rssSubscribe = ({ href = util.getCurrentLocation("href") } = {}) => + () => actions.openLink(`${rssSubscribeUrl}${encodeURIComponent(href)}`, { newTab: true })() + // Surfingkeys-specific actions // ---------------------------- actions.createHint = (selector, action) => () => { diff --git a/keys.js b/keys.js index 03c50c9..15a71e6 100644 --- a/keys.js +++ b/keys.js @@ -141,6 +141,12 @@ const maps = { description: "Show outline.com version of page", callback: actions.showOutline(), }, + { + alias: "=r", + category: categories.misc, + description: "Subscribe to RSS feed for page", + callback: actions.rssSubscribe(), + }, { alias: ";pd", category: categories.misc,