dotfiles icon indicating copy to clipboard operation
dotfiles copied to clipboard

Add commands to send JS to chrome for execution

Open christoomey opened this issue 10 years ago • 0 comments

Using chrome-cli I can execute arbitrary JS in a page context. Just need to slap together the right system call from Vim. A start:

function! s:ExecuteInPageConsole()
  let line = escape(getreg("."), "'")
  silent call system("chrome-cli execute '" . line . "'")
endfunction

command! ExecuteInPageConsole call <sid>ExecuteInPageConsole()

christoomey avatar Nov 01 '15 23:11 christoomey