Add o bind to move cursor to other end of selection

This commit is contained in:
Oliver Blanthorn 2020-05-05 15:49:57 +01:00
parent bebe694ebe
commit 426513327d
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
2 changed files with 3 additions and 0 deletions

View file

@ -143,6 +143,7 @@ import * as urlutils from "@src/lib/url_util"
import * as scrolling from "@src/content/scrolling"
import * as R from "ramda"
import * as locks from "@src/lib/locks"
import * as visual from "@src/lib/visual"
/* tslint:disable:import-spacing */
; (window as any).tri = Object.assign(Object.create(null), {
browserBg: webext.browserBg,
@ -162,6 +163,7 @@ import * as locks from "@src/lib/locks"
messaging,
state,
scrolling,
visual,
webext,
l: prom => prom.then(console.log).catch(console.error),
native,

View file

@ -348,6 +348,7 @@ export class default_config {
"$": 'js document.getSelection().modify("extend","forward","lineboundary")',
"0": 'js document.getSelection().modify("extend","backward","lineboundary")',
"=": "js let n = document.getSelection().anchorNode.parentNode; let s = window.getSelection(); let r = document.createRange(); s.removeAllRanges(); r.selectNodeContents(n); s.addRange(r)",
"o": "js tri.visual.reverseSelection(document.getSelection())",
"🕷🕷INHERITS🕷🕷": "nmaps",
}