mirror of
https://github.com/vale981/tridactyl
synced 2025-03-05 09:31:41 -05:00
Append space to excmds again
This commit is contained in:
commit
31ca72cc55
4 changed files with 6 additions and 30 deletions
|
@ -37,7 +37,7 @@ function process() {
|
|||
|
||||
export function fillcmdline(newcommand?: string){
|
||||
if (newcommand !== undefined) {
|
||||
clInput.value = newcommand
|
||||
clInput.value = newcommand + " "
|
||||
}
|
||||
// Focus is lost for some reason.
|
||||
focus()
|
||||
|
|
|
@ -359,8 +359,6 @@ export function fillcmdline(str?: string) {
|
|||
}
|
||||
|
||||
//#content
|
||||
<<<<<<< Updated upstream
|
||||
||||||| merged common ancestors
|
||||
export function clipboard(excmd = "open"){
|
||||
let scratchpad = document.createElement("input")
|
||||
scratchpad.contentEditable = "true"
|
||||
|
@ -369,7 +367,6 @@ export function clipboard(excmd = "open"){
|
|||
scratchpad.value = window.location.href
|
||||
scratchpad.select()
|
||||
document.execCommand("Copy")
|
||||
scratchpad.select()
|
||||
// open is broken - fails with Failed to execute excmd: clipboard(...open)!
|
||||
} else if (excmd == "open"){
|
||||
scratchpad.focus()
|
||||
|
@ -384,32 +381,6 @@ export function clipboard(excmd = "open"){
|
|||
}
|
||||
|
||||
//#content
|
||||
=======
|
||||
export function clipboard(excmd = "open"){
|
||||
let scratchpad = document.createElement("input")
|
||||
scratchpad.contentEditable = "true"
|
||||
document.documentElement.appendChild(scratchpad)
|
||||
if (excmd == "yank"){
|
||||
scratchpad.value = window.location.href
|
||||
scratchpad.select()
|
||||
document.execCommand("Copy")
|
||||
// open is broken - fails with Failed to execute excmd: clipboard(...open)!
|
||||
} else if (excmd == "open"){
|
||||
console.log("blah")
|
||||
scratchpad.focus()
|
||||
scratchpad.select()
|
||||
// document.execCommand("Paste")
|
||||
let url = scratchpad.textContent
|
||||
console.log(url)
|
||||
// open(url)
|
||||
}
|
||||
// document.documentElement.removeChild(scratchpad)
|
||||
// let pastecontent = scratchpad.textContent
|
||||
// console.log(pastecontent)
|
||||
}
|
||||
|
||||
//#content
|
||||
>>>>>>> Stashed changes
|
||||
export function resizecmdline() {
|
||||
CommandLineContent.resize()
|
||||
}
|
||||
|
|
|
@ -26,6 +26,8 @@
|
|||
"bookmarks",
|
||||
"contextMenus",
|
||||
"cookies",
|
||||
"clipboardWrite",
|
||||
"clipboardRead",
|
||||
"downloads",
|
||||
"downloads.open",
|
||||
"find",
|
||||
|
|
|
@ -38,6 +38,9 @@ export namespace normalmode {
|
|||
["]]", "clicknext"],
|
||||
["[[", "clicknext prev"],
|
||||
["T", "current-url tab"],
|
||||
["yy", "clipboard yank"],
|
||||
["p", "clipboard open"],
|
||||
["P", "clipboard tabopen"],
|
||||
["j", "scrollline 10"],
|
||||
["k", "scrollline -10"],
|
||||
["h", "scrollx -5"],
|
||||
|
|
Loading…
Add table
Reference in a new issue