First (broken) attempt at yy to yank URLs

This commit is contained in:
Oliver Blanthorn 2017-10-19 12:42:49 +01:00
parent 4d109a7796
commit c76d3a6c9a
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3
3 changed files with 16 additions and 0 deletions

View file

@ -358,6 +358,18 @@ export function fillcmdline(str?: string) {
message("commandline_frame", "fillcmdline", [str])
}
//#content
export function clipboard(excmd = "open"){
let scratchpad = document.createElement("input")
scratchpad.contentEditable = "true"
scratchpad.textContent = window.location.href
scratchpad.select()
document.execCommand("Copy")
console.log(scratchpad)
let pastecontent = scratchpad.textContent
console.log(pastecontent)
}
//#content
export function resizecmdline() {
CommandLineContent.resize()

View file

@ -26,6 +26,8 @@
"bookmarks",
"contextMenus",
"cookies",
"clipboardWrite",
"clipboardRead",
"downloads",
"downloads.open",
"find",

View file

@ -38,6 +38,8 @@ export namespace normalmode {
["]]", "clicknext"],
["[[", "clicknext prev"],
["T", "current-url tab"],
["p", "clipboard open"],
["P", "clipboard tabopen"],
["j", "scrollline 10"],
["k", "scrollline -10"],
["h", "scrollx -5"],