feat: add bindings and satisfy eslint
- add several bindings - add wiktionary keys as alias of wikipedia
This commit is contained in:
parent
7a1b5bcee9
commit
5d3e12a614
19
README.md
19
README.md
|
@ -15,7 +15,7 @@ Maddy's SurfingKeys Configuration
|
|||
This is my personal configuration for the wonderful [SurfingKeys](https://github.com/brookhong/Surfingkeys) browser extension.
|
||||
|
||||
Its primary features include [keybindings for performing common actions](#site-specific-key-mappings) on many popular
|
||||
sites, as well as OmniBar support for [auto-completing searches](#bundled-search-engine-completions) within 44 sites (and growing)!
|
||||
sites, as well as OmniBar support for [auto-completing searches](#bundled-search-engine-completions) within 47 sites (and growing)!
|
||||
|
||||
Table of Contents
|
||||
-----------------
|
||||
|
@ -32,7 +32,7 @@ Features
|
|||
|
||||
### Site-Specific Key Mappings
|
||||
|
||||
181 key mappings for 16 unique
|
||||
195 key mappings for 17 unique
|
||||
sites have been included which can help you perform some common actions:
|
||||
|
||||
<table>
|
||||
|
@ -50,6 +50,8 @@ sites have been included which can help you perform some common actions:
|
|||
<tr><td><code>=w</code></td><td>Lookup whois information for domain</td></tr>
|
||||
<tr><td><code>=d</code></td><td>Lookup dns information for domain</td></tr>
|
||||
<tr><td><code>=D</code></td><td>Lookup all information for domain</td></tr>
|
||||
<tr><td><code>=c</code></td><td>Show Google's cached version of page</td></tr>
|
||||
<tr><td><code>=a</code></td><td>Show Archive.org Wayback Machine for page</td></tr>
|
||||
<tr><td><code>;pd</code></td><td>Toggle PDF viewer from SurfingKeys</td></tr>
|
||||
<tr><th colspan="2"><a href="//amazon.com">amazon.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>fs</code></td><td>Fakespot</td></tr>
|
||||
|
@ -73,11 +75,13 @@ sites have been included which can help you perform some common actions:
|
|||
<tr><td><code><Space>u</code></td><td>View User</td></tr>
|
||||
<tr><td><code><Space>f</code></td><td>View File</td></tr>
|
||||
<tr><td><code><Space>i</code></td><td>View Issue</td></tr>
|
||||
<tr><td><code><Space>p</code></td><td>View Pull Request</td></tr>
|
||||
<tr><td><code>gp</code></td><td>Go to parent</td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Toggle Star</td></tr>
|
||||
<tr><td><code><Space>S</code></td><td>Check Star</td></tr>
|
||||
<tr><td><code><Space>y</code></td><td>Copy Project Path</td></tr>
|
||||
<tr><td><code><Space>Y</code></td><td>Copy Project Path (including domain)</td></tr>
|
||||
<tr><td><code><Space>l</code></td><td>Toggle repo language stats</td></tr>
|
||||
<tr><td><code><Space>D</code></td><td>View GoDoc for Project</td></tr>
|
||||
<tr><th colspan="2"><a href="//gitlab.com">gitlab.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Toggle Star</td></tr>
|
||||
|
@ -97,6 +101,8 @@ sites have been included which can help you perform some common actions:
|
|||
<tr><td><code><Space>c</code></td><td>View post (comments)</td></tr>
|
||||
<tr><td><code><Space>C</code></td><td>View post (comments) (new tab)</td></tr>
|
||||
<tr><td><code>gp</code></td><td>Go to parent</td></tr>
|
||||
<tr><td><code>]]</code></td><td>Next page</td></tr>
|
||||
<tr><td><code>[[</code></td><td>Prev page</td></tr>
|
||||
<tr><th colspan="2"><a href="//producthunt.com">producthunt.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View product (external)</td></tr>
|
||||
<tr><td><code><Space>v</code></td><td>View product</td></tr>
|
||||
|
@ -124,6 +130,10 @@ sites have been included which can help you perform some common actions:
|
|||
<tr><td><code><Space>F</code></td><td>Toggle fullscreen</td></tr>
|
||||
<tr><th colspan="2"><a href="//wikipedia.org">wikipedia.org</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Toggle simple version of current article</td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View page</td></tr>
|
||||
<tr><th colspan="2"><a href="//wiktionary.org">wiktionary.org</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>s</code></td><td>Toggle simple version of current article</td></tr>
|
||||
<tr><td><code><Space>a</code></td><td>View page</td></tr>
|
||||
<tr><th colspan="2"><a href="//yelp.com">yelp.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
<tr><td><code><Space>fs</code></td><td>Fakespot</td></tr>
|
||||
<tr><th colspan="2"><a href="//youtube.com">youtube.com</a></th></tr><tr><td><strong>Mapping</strong></td><td><strong>Description</strong></td></tr>
|
||||
|
@ -138,7 +148,7 @@ sites have been included which can help you perform some common actions:
|
|||
|
||||
### Bundled Search Engine Completions
|
||||
|
||||
There are currently 44 Search Engine auto-completions.
|
||||
There are currently 47 Search Engine auto-completions.
|
||||
|
||||
You can access a Search Engine auto-completion by pressing the search leader key, which is `a` by default, followed by the search engine alias.
|
||||
|
||||
|
@ -148,6 +158,8 @@ For example, to open the Wikipedia completion, you would type `awp` while in nor
|
|||
| ----- | ---- | ------ | ----------- |
|
||||
| `af` | `archforums` | `Google Custom Search` | |
|
||||
| `al` | `archlinux` | `www.archlinux.org` | |
|
||||
| `as` | `aws` | `google.com` | |
|
||||
| `at` | `alternativeTo` | `alternativeto.net` | |
|
||||
| `au` | `AUR` | `aur.archlinux.org` | |
|
||||
| `aw` | `archwiki` | `wiki.archlinux.org` | |
|
||||
| `az` | `amazon` | `smile.amazon.com` | |
|
||||
|
@ -188,6 +200,7 @@ For example, to open the Wikipedia completion, you would type `awp` while in nor
|
|||
| `wa` | `wolframalpha` | `www.wolframalpha.com` | [:framed_picture:](#wolframalpha) [:framed_picture:](#wolframalpha-2) |
|
||||
| `wp` | `wikipedia` | `en.wikipedia.org` | |
|
||||
| `ws` | `wikipedia-simple` | `simple.wikipedia.org` | |
|
||||
| `wt` | `wiktionary` | `en.wiktionary.org` | |
|
||||
| `yp` | `yelp` | `www.yelp.com` | |
|
||||
| `yt` | `youtube` | `www.youtube.com` | [:framed_picture:](#youtube) |
|
||||
|
||||
|
|
161
actions.js
161
actions.js
|
@ -26,18 +26,16 @@ actions.getURLPath = ({ count = 0, domain = false } = {}) => {
|
|||
return path
|
||||
}
|
||||
|
||||
actions.copyURLPath = ({ count, domain } = {}) =>
|
||||
() => Clipboard.write(actions.getURLPath({ count, domain }))
|
||||
actions.copyURLPath = ({ count, domain } = {}) => () => Clipboard
|
||||
.write(actions.getURLPath({ count, domain }))
|
||||
|
||||
// Whois/DNS lookup
|
||||
// ----------------
|
||||
// Site/Page Information
|
||||
// ---------------------
|
||||
const domainDossierUrl = "http://centralops.net/co/DomainDossier.aspx"
|
||||
|
||||
actions.showWhois = ({ hostname = util.getCurrentLocation("hostname") } = {}) =>
|
||||
() => actions.openLink(`${domainDossierUrl}?dom_whois=true&addr=${hostname}`, { newTab: true })()
|
||||
actions.showWhois = ({ hostname = util.getCurrentLocation("hostname") } = {}) => () => actions.openLink(`${domainDossierUrl}?dom_whois=true&addr=${hostname}`, { newTab: true })()
|
||||
|
||||
actions.showDns = ({ hostname = util.getCurrentLocation("hostname"), verbose = false } = {}) =>
|
||||
() => {
|
||||
actions.showDns = ({ hostname = util.getCurrentLocation("hostname"), verbose = false } = {}) => () => {
|
||||
let u = ""
|
||||
if (verbose) {
|
||||
u = `${domainDossierUrl}?dom_whois=true&dom_dns=true&traceroute=true&net_whois=true&svc_scan=true&addr=${hostname}`
|
||||
|
@ -45,28 +43,33 @@ actions.showDns = ({ hostname = util.getCurrentLocation("hostname"), verbose = f
|
|||
u = `${domainDossierUrl}?dom_dns=true&addr=${hostname}`
|
||||
}
|
||||
actions.openLink(u, { newTab: true })()
|
||||
}
|
||||
}
|
||||
|
||||
const googleCacheUrl = "https://webcache.googleusercontent.com/search?q=cache:"
|
||||
|
||||
actions.showGoogleCache = ({ href = util.getCurrentLocation("href") } = {}) => () => actions.openLink(`${googleCacheUrl}${href}`, { newTab: true })()
|
||||
|
||||
const waybackUrl = "https://web.archive.org/web/*/"
|
||||
|
||||
actions.showWayback = ({ href = util.getCurrentLocation("href") } = {}) => () => actions.openLink(`${waybackUrl}${href}`, { newTab: true })()
|
||||
|
||||
// Surfingkeys-specific actions
|
||||
// ----------------------------
|
||||
actions.createHint = (selector, action = Hints.dispatchMouseClick) =>
|
||||
() => Hints.create(selector, action)
|
||||
actions.createHint = (selector, action = Hints.dispatchMouseClick) => () => Hints
|
||||
.create(selector, action)
|
||||
|
||||
actions.openAnchor = ({ newTab = false, prop = "href" } = {}) =>
|
||||
a => actions.openLink(a[prop], { newTab })()
|
||||
actions.openAnchor = ({ newTab = false, prop = "href" } = {}) => a => actions.openLink(a[prop], { newTab })()
|
||||
|
||||
actions.openLink = (u, { newTab = false } = {}) =>
|
||||
() => {
|
||||
actions.openLink = (u, { newTab = false } = {}) => () => {
|
||||
if (window === undefined) {
|
||||
return
|
||||
}
|
||||
window.open(u, newTab ? "_blank" : "_self")
|
||||
}
|
||||
}
|
||||
|
||||
actions.editSettings = actions.openLink("/pages/options.html", { newTab: true })
|
||||
|
||||
actions.togglePdfViewer = () =>
|
||||
chrome.storage.local.get("noPdfViewer", (resp) => {
|
||||
actions.togglePdfViewer = () => chrome.storage.local.get("noPdfViewer", (resp) => {
|
||||
if (!resp.noPdfViewer) {
|
||||
chrome.storage.local.set({ noPdfViewer: 1 }, () => {
|
||||
Front.showBanner("PDF viewer disabled.")
|
||||
|
@ -76,20 +79,18 @@ actions.togglePdfViewer = () =>
|
|||
Front.showBanner("PDF viewer enabled.")
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// Site-specific actions
|
||||
// =====================
|
||||
|
||||
// FakeSpot
|
||||
// --------
|
||||
actions.fakeSpot =
|
||||
(url = util.getCurrentLocation("href")) => actions.openLink(`http://fakespot.com/analyze?url=${url}`, { newTab: true })()
|
||||
actions.fakeSpot = (url = util.getCurrentLocation("href")) => actions.openLink(`http://fakespot.com/analyze?url=${url}`, { newTab: true })()
|
||||
|
||||
// Godoc
|
||||
// -----
|
||||
actions.viewGodoc = () =>
|
||||
actions.openLink(`https://godoc.org/${actions.getURLPath({ count: 2, domain: true })}`, { newTab: true })()
|
||||
actions.viewGodoc = () => actions.openLink(`https://godoc.org/${actions.getURLPath({ count: 2, domain: true })}`, { newTab: true })()
|
||||
|
||||
// GitHub
|
||||
// ------
|
||||
|
@ -126,16 +127,14 @@ actions.gh.openRepo = () => {
|
|||
const u = new URL(a.href)
|
||||
const [user, repo, ...rest] = u.pathname.split("/").filter(s => s !== "")
|
||||
return (
|
||||
u.origin === util.getCurrentLocation("origin") &&
|
||||
u.hash === "" &&
|
||||
u.search === "" &&
|
||||
typeof user === "string" &&
|
||||
user.length > 0 &&
|
||||
typeof repo === "string" &&
|
||||
repo.length > 0 &&
|
||||
rest.length === 0 &&
|
||||
/^([a-zA-Z0-9]+-?)+$/.test(user) &&
|
||||
!ghReservedNames.check(user)
|
||||
u.origin === util.getCurrentLocation("origin")
|
||||
&& typeof user === "string"
|
||||
&& user.length > 0
|
||||
&& typeof repo === "string"
|
||||
&& repo.length > 0
|
||||
&& rest.length === 0
|
||||
&& /^([a-zA-Z0-9]+-?)+$/.test(user)
|
||||
&& !ghReservedNames.check(user)
|
||||
)
|
||||
})
|
||||
Hints.create(elements, Hints.dispatchMouseClick)
|
||||
|
@ -147,14 +146,12 @@ actions.gh.openUser = () => {
|
|||
const u = new URL(a.href)
|
||||
const [user, ...rest] = u.pathname.split("/").filter(s => s !== "")
|
||||
return (
|
||||
u.origin === util.getCurrentLocation("origin") &&
|
||||
u.hash === "" &&
|
||||
u.search === "" &&
|
||||
typeof user === "string" &&
|
||||
user.length > 0 &&
|
||||
rest.length === 0 &&
|
||||
/^([a-zA-Z0-9]+-?)+$/.test(user) &&
|
||||
!ghReservedNames.check(user)
|
||||
u.origin === util.getCurrentLocation("origin")
|
||||
&& typeof user === "string"
|
||||
&& user.length > 0
|
||||
&& rest.length === 0
|
||||
&& /^([a-zA-Z0-9]+-?)+$/.test(user)
|
||||
&& !ghReservedNames.check(user)
|
||||
)
|
||||
})
|
||||
Hints.create(elements, Hints.dispatchMouseClick)
|
||||
|
@ -166,18 +163,16 @@ actions.gh.openFile = () => {
|
|||
const u = new URL(a.href)
|
||||
const [user, repo, maybeBlob, ...rest] = u.pathname.split("/").filter(s => s !== "")
|
||||
return (
|
||||
u.origin === util.getCurrentLocation("origin") &&
|
||||
u.hash === "" &&
|
||||
u.search === "" &&
|
||||
typeof user === "string" &&
|
||||
user.length > 0 &&
|
||||
typeof repo === "string" &&
|
||||
repo.length > 0 &&
|
||||
typeof maybeBlob === "string" &&
|
||||
(maybeBlob === "blob" || maybeBlob === "tree") &&
|
||||
rest.length !== 0 &&
|
||||
/^([a-zA-Z0-9]+-?)+$/.test(user) &&
|
||||
!ghReservedNames.check(user)
|
||||
u.origin === util.getCurrentLocation("origin")
|
||||
&& typeof user === "string"
|
||||
&& user.length > 0
|
||||
&& typeof repo === "string"
|
||||
&& repo.length > 0
|
||||
&& typeof maybeBlob === "string"
|
||||
&& (maybeBlob === "blob" || maybeBlob === "tree")
|
||||
&& rest.length !== 0
|
||||
&& /^([a-zA-Z0-9]+-?)+$/.test(user)
|
||||
&& !ghReservedNames.check(user)
|
||||
)
|
||||
})
|
||||
Hints.create(elements, Hints.dispatchMouseClick)
|
||||
|
@ -189,25 +184,43 @@ actions.gh.openIssue = () => {
|
|||
const u = new URL(a.href)
|
||||
const [user, repo, maybeIssues] = u.pathname.split("/").filter(s => s !== "")
|
||||
return (
|
||||
u.origin === util.getCurrentLocation("origin") &&
|
||||
u.hash === "" &&
|
||||
u.search === "" &&
|
||||
typeof user === "string" &&
|
||||
user.length > 0 &&
|
||||
typeof repo === "string" &&
|
||||
repo.length > 0 &&
|
||||
maybeIssues === "issues" &&
|
||||
/^([a-zA-Z0-9]+-?)+$/.test(user) &&
|
||||
!ghReservedNames.check(user)
|
||||
u.origin === util.getCurrentLocation("origin")
|
||||
&& typeof user === "string"
|
||||
&& user.length > 0
|
||||
&& typeof repo === "string"
|
||||
&& repo.length > 0
|
||||
&& maybeIssues === "issues"
|
||||
&& /^([a-zA-Z0-9]+-?)+$/.test(user)
|
||||
&& !ghReservedNames.check(user)
|
||||
)
|
||||
})
|
||||
Hints.create(elements, Hints.dispatchMouseClick)
|
||||
}
|
||||
|
||||
actions.gh.openPull = () => {
|
||||
const elements = [...document.querySelectorAll("a[href]")]
|
||||
.filter((a) => {
|
||||
const u = new URL(a.href)
|
||||
const [user, repo, maybePulls] = u.pathname.split("/").filter(s => s !== "")
|
||||
return (
|
||||
u.origin === util.getCurrentLocation("origin")
|
||||
&& typeof user === "string"
|
||||
&& user.length > 0
|
||||
&& typeof repo === "string"
|
||||
&& repo.length > 0
|
||||
&& /^pulls?$/.test(maybePulls)
|
||||
&& /^([a-zA-Z0-9]+-?)+$/.test(user)
|
||||
&& !ghReservedNames.check(user)
|
||||
)
|
||||
})
|
||||
Hints.create(elements, Hints.dispatchMouseClick)
|
||||
}
|
||||
|
||||
actions.gh.toggleLangStats = () => document.querySelector("button.js-toggle-lang-stats").click()
|
||||
|
||||
actions.gh.goParent = () => {
|
||||
const segments = util.getCurrentLocation("pathname")
|
||||
.split("/").filter(s => s !== "")
|
||||
console.log(`goParent: ${segments}`)
|
||||
const newPath = (() => {
|
||||
const [user, repo, maybeBlob] = segments
|
||||
switch (segments.length) {
|
||||
|
@ -220,18 +233,22 @@ actions.gh.goParent = () => {
|
|||
return [user, repo]
|
||||
case "pull":
|
||||
return [user, repo, "pulls"]
|
||||
default:
|
||||
break
|
||||
}
|
||||
break
|
||||
case 5:
|
||||
if (maybeBlob === "blob") {
|
||||
return [user, repo]
|
||||
}
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
return segments.slice(0, segments.length - 1)
|
||||
})()
|
||||
console.log(`newPath: ${newPath}`)
|
||||
if (newPath !== false) {
|
||||
const u = `${util.getCurrentLocation("origin")}/${newPath.join("/")}`
|
||||
console.log(`newPath u: ${u}`)
|
||||
actions.openLink(u)()
|
||||
}
|
||||
}
|
||||
|
@ -271,7 +288,6 @@ actions.re.toggleVisibleExpandos = (dir = 0) => () => {
|
|||
} else if (dir === 1) {
|
||||
sel += ".collapsed"
|
||||
}
|
||||
console.log(sel)
|
||||
Array.from(document.querySelectorAll(sel))
|
||||
.filter(e => util.isElementInViewport(e))
|
||||
.forEach(e => e.click())
|
||||
|
@ -323,18 +339,16 @@ actions.hn.goPage = (dist = 1) => {
|
|||
// -----------
|
||||
actions.ph = {}
|
||||
actions.ph.openExternal = () => {
|
||||
Hints.create("ul[class^='postsList_'] > li > div[class^='item_']", p =>
|
||||
actions.openLink(
|
||||
p.querySelector("div[class^='meta_'] > div[class^='actions_'] > div[class^='minorActions_'] > a:nth-child(1)").href
|
||||
, { newTab: true }
|
||||
Hints.create("ul[class^='postsList_'] > li > div[class^='item_']", p => actions.openLink(
|
||||
p.querySelector("div[class^='meta_'] > div[class^='actions_'] > div[class^='minorActions_'] > a:nth-child(1)").href,
|
||||
{ newTab: true }
|
||||
)())
|
||||
}
|
||||
|
||||
// Dribbble
|
||||
// --------
|
||||
actions.dr = {}
|
||||
actions.dr.attachment = (cb = a => actions.openLink(a, { newTab: true })()) =>
|
||||
actions.createHint(".attachments .thumb", a => cb(a.src.replace("/thumbnail/", "/")))
|
||||
actions.dr.attachment = (cb = a => actions.openLink(a, { newTab: true })()) => actions.createHint(".attachments .thumb", a => cb(a.src.replace("/thumbnail/", "/")))
|
||||
|
||||
// Wikipedia
|
||||
// ---------
|
||||
|
@ -348,6 +362,7 @@ actions.wp.toggleSimple = () => {
|
|||
}
|
||||
return s
|
||||
}).filter(s => s !== "").join(".")
|
||||
actions.openLink(u.href)()
|
||||
}
|
||||
|
||||
module.exports = actions
|
||||
|
|
|
@ -18,6 +18,7 @@ const keys = {
|
|||
google_yt: "", // https://developers.google.com/youtube/v3/docs/
|
||||
wolframalpha: "", // https://products.wolframalpha.com/api/
|
||||
domainr: "", // https://market.mashape.com/domainr/domainr
|
||||
alternativeTo: "", // Extract the x-algolia-api-key sent with requests when typing in search box on alternativeto.net
|
||||
|
||||
// ****** Google Custom Search Engines ****** //
|
||||
// Can be created at https://cse.google.com/cse
|
||||
|
|
35
keys.js
35
keys.js
|
@ -12,6 +12,7 @@ const unmaps = {
|
|||
"zz", "zR", "ab",
|
||||
"Q", "q", "ag",
|
||||
"af", ";s", "yp",
|
||||
"<Ctrl-j>", "<Ctrl-h>",
|
||||
],
|
||||
searchAliases: {
|
||||
s: ["g", "d", "b",
|
||||
|
@ -92,6 +93,18 @@ const maps = {
|
|||
description: "Lookup all information for domain",
|
||||
callback: actions.showDns({ verbose: true }),
|
||||
},
|
||||
{
|
||||
alias: "=c",
|
||||
category: categories.misc,
|
||||
description: "Show Google's cached version of page",
|
||||
callback: actions.showGoogleCache(),
|
||||
},
|
||||
{
|
||||
alias: "=a",
|
||||
category: categories.misc,
|
||||
description: "Show Archive.org Wayback Machine for page",
|
||||
callback: actions.showWayback(),
|
||||
},
|
||||
{
|
||||
alias: ";pd",
|
||||
category: categories.misc,
|
||||
|
@ -112,12 +125,12 @@ const maps = {
|
|||
{
|
||||
alias: "a",
|
||||
description: "Open search result",
|
||||
callback: actions.createHint(".r>a"),
|
||||
callback: actions.createHint("a.fl, .r>a"),
|
||||
},
|
||||
{
|
||||
alias: "A",
|
||||
description: "Open search result (new tab)",
|
||||
callback: actions.createHint(".r>a", actions.openAnchor({ newTab: true })),
|
||||
callback: actions.createHint("a.fl, .r>a", actions.openAnchor({ newTab: true })),
|
||||
},
|
||||
],
|
||||
|
||||
|
@ -192,6 +205,11 @@ const maps = {
|
|||
description: "View Issue",
|
||||
callback: actions.gh.openIssue,
|
||||
},
|
||||
{
|
||||
alias: "p",
|
||||
description: "View Pull Request",
|
||||
callback: actions.gh.openPull,
|
||||
},
|
||||
{
|
||||
leader: "",
|
||||
alias: "gp",
|
||||
|
@ -218,6 +236,11 @@ const maps = {
|
|||
description: "Copy Project Path (including domain)",
|
||||
callback: actions.copyURLPath({ count: 2, domain: true }),
|
||||
},
|
||||
{
|
||||
alias: "l",
|
||||
description: "Toggle repo language stats",
|
||||
callback: actions.gh.toggleLangStats,
|
||||
},
|
||||
{
|
||||
alias: "D",
|
||||
description: "View GoDoc for Project",
|
||||
|
@ -493,7 +516,15 @@ const maps = {
|
|||
description: "Toggle simple version of current article",
|
||||
callback: actions.wp.toggleSimple,
|
||||
},
|
||||
{
|
||||
alias: "a",
|
||||
description: "View page",
|
||||
callback: actions.createHint("#bodyContent :not(sup):not(.mw-editsection) > a"),
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
// Aliases
|
||||
maps["wiktionary.org"] = maps["wikipedia.org"]
|
||||
|
||||
module.exports = { unmaps, maps }
|
||||
|
|
Loading…
Reference in New Issue