mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Add open excmd
This commit is contained in:
parent
f990bd0134
commit
4dc218084d
2 changed files with 8 additions and 1 deletions
|
@ -137,10 +137,14 @@ export async function tabnext(increment = 1) {
|
|||
}
|
||||
export function tabprev(increment = 1) { tabnext(increment*-1) }
|
||||
|
||||
// History functions
|
||||
// History/navigation functions
|
||||
export function history(n = 1) {messageActiveTab("history",[n])}
|
||||
export function historyback(n = 1) {history(n*-1)}
|
||||
export function historyforward(n = 1) {history(n)}
|
||||
export function open(url: string) {
|
||||
url = (hasScheme(url)? "" : "http://") + url
|
||||
messageActiveTab("open", [url])
|
||||
}
|
||||
|
||||
// Misc functions
|
||||
export function focuscmdline() { messageActiveTab("focuscmdline") }
|
||||
|
|
|
@ -23,6 +23,9 @@ const commands = new Map<string, ContentCommand>([
|
|||
function history(n: number) {
|
||||
window.history.go(n)
|
||||
},
|
||||
function open(url: string) {
|
||||
window.location.href = url
|
||||
},
|
||||
function showcommandline() {
|
||||
CommandLineContent.focus()
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue