commit
8b9125871b
18 changed files with 137 additions and 69 deletions
@ -1,9 +1,10 @@ |
||||
export default { |
||||
// console commands
|
||||
CONSOLE_SHOW_COMMAND: 'console.show.command', |
||||
CONSOLE_SET_COMPLETIONS: 'console.set.completions', |
||||
CONSOLE_SHOW_ERROR: 'console.show.error', |
||||
CONSOLE_HIDE: 'console.hide', |
||||
CONSOLE_SHOW_INFO: 'console.show.info', |
||||
CONSOLE_HIDE_COMMAND: 'console.hide.command', |
||||
CONSOLE_SET_COMPLETIONS: 'console.set.completions', |
||||
CONSOLE_COMPLETION_NEXT: 'console.completion.next', |
||||
CONSOLE_COMPLETION_PREV: 'console.completion.prev', |
||||
}; |
||||
|
@ -0,0 +1,15 @@ |
||||
const yank = (win) => { |
||||
let input = win.document.createElement('input'); |
||||
win.document.body.append(input); |
||||
|
||||
input.style.position = 'fixed'; |
||||
input.style.top = '-100px'; |
||||
input.value = win.location.href; |
||||
input.select(); |
||||
|
||||
win.document.execCommand('copy'); |
||||
|
||||
input.remove(); |
||||
}; |
||||
|
||||
export { yank }; |
Reference in new issue