[merge] FUNDING.yml

This commit is contained in:
Maddison Hellstrom 2020-06-18 13:45:06 -07:00
commit e35d5ff53f
5 changed files with 34 additions and 3 deletions

View File

@ -12,7 +12,7 @@ Maddy's SurfingKeys Configuration
This is my configuration for the [SurfingKeys](https://github.com/brookhong/Surfingkeys) browser extension.
Its primary features include
- 128 [Site-Specific Key Mappings](#site-specific-key-mappings) which **automate common actions** on many popular websites
- 129 [Site-Specific Key Mappings](#site-specific-key-mappings) which **automate common actions** on many popular websites
- 55 [Search Suggestion Engines](#search-suggestion-engines) providing **interactive search suggestions** from dozens of knowledge sources
Table of Contents
@ -30,7 +30,7 @@ Features
### Site-Specific Key Mappings
128 key mappings for 21 unique
129 key mappings for 21 unique
sites have been included which can help you perform some common actions:
<table>
@ -59,6 +59,7 @@ sites have been included which can help you perform some common actions:
<tr><td><code>&#x3D;a</code></td><td>Show Archive.org Wayback Machine for page</td></tr>
<tr><td><code>&#x3D;o</code></td><td>Show outline.com version of page</td></tr>
<tr><td><code>&#x3D;r</code></td><td>Subscribe to RSS feed for page</td></tr>
<tr><td><code>&#x3D;s</code></td><td>Speed read page</td></tr>
<tr><td><code>;pd</code></td><td>Toggle PDF viewer from SurfingKeys</td></tr>
<tr><td><code>gxE</code></td><td>Close tab to left</td></tr>
<tr><td><code>gxR</code></td><td>Close tab to right</td></tr>

View File

@ -75,6 +75,24 @@ const rssSubscribeUrl = "https://feedrabbit.com/subscriptions/new?url="
actions.rssSubscribe = ({ href = util.getCurrentLocation("href") } = {}) =>
() => actions.openLink(`${rssSubscribeUrl}${encodeURIComponent(href)}`, { newTab: true })()
actions.showSpeedReader = () => {
const script = document.createElement("script")
script.innerHTML = `(() => {
const sq = window.sq || {}
window.sq = sq
if (sq.script) {
sq.again()
} else if (sq.context !== "inner") {
sq.bookmarkletVersion = "0.3.0"
sq.iframeQueryParams = { host: "//squirt.io" }
sq.script = document.createElement("script")
sq.script.src = \`\${sq.iframeQueryParams.host}/bookmarklet/frame.outer.js\`
document.body.appendChild(sq.script)
}
})()`
document.body.appendChild(script)
}
// Surfingkeys-specific actions
// ----------------------------
actions.createHint = (selector, action) => () => {
@ -273,7 +291,13 @@ actions.dg.goog = () => {
// ------
actions.gh = {}
actions.gh.star = ({ toggle = false } = {}) => async () => {
const starContainers = [...document.querySelectorAll("div.starring-container")]
const hasDisplayNoneParent = (e) =>
window.getComputedStyle(e).display === "none"
|| (e.parentElement ? hasDisplayNoneParent(e.parentElement) : false)
const starContainers = Array.from(document.querySelectorAll("div.starring-container"))
.filter((e) => !hasDisplayNoneParent(e))
if (starContainers.length === 0) return
let container

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -159,6 +159,12 @@ const maps = {
description: "Subscribe to RSS feed for page",
callback: actions.rssSubscribe(),
},
{
alias: "=s",
category: categories.misc,
description: "Speed read page",
callback: actions.showSpeedReader,
},
{
alias: ";pd",
category: categories.misc,