Merge branch 'master' of github.com:cmcaine/tridactyl into add_excmd_completion_source

This commit is contained in:
Oliver Blanthorn 2018-08-16 14:57:09 +01:00
commit e1bb76600e
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
5 changed files with 28 additions and 23 deletions

View file

@ -1,6 +1,6 @@
# Tridactyl changelog
## Release 1.13.2 / Unreleased
## Release 1.13.2 / 2018-08-15
* New features:
@ -28,13 +28,13 @@
* Add `autocmddelete` to delete an autocmd.
* Add `hintdelay` setting (measured in milliseconds) to add a short pause before hint mode is left after choosing a link (#386). It is mostly of use to people using `set hintfiltermode vimperator`, so that they have time to stop typing before Tridactyl returns to normal mode.
* Add `hintdelay` setting (measured in milliseconds) to add a short pause before hint mode is left after choosing a link (#386) with the `hintfiltermode vimperator*` hint modes so that one has time to stop typing before Tridactyl returns to normal mode.
* Add binds for yankmd and yanktitle to `yt` and `ym` irrespectively.
* Our GitHub has a new troublehooting guide and issue template (#522).
* `GitHub` can no longer steal `/` from Firefox. If you are unhappy with this state of affairs, try `set leavegithubalone true`.
* Websites can no longer steal `/` from Firefox. If you are unhappy with this state of affairs, try `set leavegithubalone true`.
* Bug fixes:

View file

@ -190,25 +190,25 @@ config.getAsync("leavegithubalone").then(v => {
if (v == "true") return
try {
// On quick loading pages, the document is already loaded
if (document.location.host == "github.com") {
// if (document.location.host == "github.com") {
document.body.addEventListener("keydown", function(e) {
if ("/".indexOf(e.key) != -1) {
e.cancelBubble = true
e.stopImmediatePropagation()
}
})
// }
} catch (e) {
// But on slower pages we wait for the document to load
window.addEventListener("DOMContentLoaded", () => {
// if (document.location.host == "github.com") {
document.body.addEventListener("keydown", function(e) {
if ("/".indexOf(e.key) != -1) {
e.cancelBubble = true
e.stopImmediatePropagation()
}
})
}
} catch (e) {
// But on slower pages we wait for the document to load
window.addEventListener("DOMContentLoaded", () => {
if (document.location.host == "github.com") {
document.body.addEventListener("keydown", function(e) {
if ("/".indexOf(e.key) != -1) {
e.cancelBubble = true
e.stopImmediatePropagation()
}
})
}
// }
})
}
})

View file

@ -1820,7 +1820,7 @@ export async function tabmove(index = "$") {
} else if (["start", "^"].includes(index)) {
newindex = 0
} else {
newindex = Number(index) + minindex - 1
newindex = Number(index) + minindex - 1
}
if (newindex > maxindex) {
@ -2444,9 +2444,11 @@ export function comclear(name: string) {
config.unset("exaliases", name)
}
/** @hidden */
//#background_helper
type bind_args = { mode: string; configName: string; key: string; excmd: string }
/** @hidden */
//#background_helper
function parse_bind_args(...args: string[]): bind_args {
if (args.length == 0) throw new Error("Invalid bind/unbind arguments.")

View file

@ -2,7 +2,7 @@
import * as config from "./config"
/** Created the element that should contain keybinding information */
/** Create the element that should contain keybinding information */
function initTridactylSettingElem(
elem: HTMLElement,
kind: string,
@ -22,17 +22,20 @@ function initTridactylSettingElem(
return bindingNode as HTMLElement
}
/** Returns an object that maps excmd names to excmd documentation element */
/** Return an object that maps excmd names to excmd documentation element */
function getCommandElements() {
return Array.from(
document.querySelectorAll("section.tsd-panel-group:nth-child(3) h3"),
document.querySelectorAll(
".tsd-panel.tsd-member.tsd-kind-function.tsd-parent-kind-external-module",
),
).reduce((all, elem) => {
all[elem.textContent] = elem.parentElement
let fnName = Array.from(elem.children).find(e => e.tagName == "H3")
if (fnName) all[fnName.textContent] = elem
return all
}, {})
}
/** Updates the doc with aliases fetched from the config */
/** Update the doc with aliases fetched from the config */
async function addSetting(settingName: string) {
let commandElems = getCommandElements()
// We're ignoring composite because it combines multiple excmds

View file

@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Tridactyl",
"version": "1.13.1",
"version": "1.13.2",
"icons": {
"64": "static/logo/Tridactyl_64px.png",
"100": "static/logo/Tridactyl_100px.png",