Created
March 21, 2012 18:56
-
-
Save axiak/2151274 to your computer and use it in GitHub Desktop.
Reload chrome for v1.0 a la http://www.emacswiki.org/emacs/SaveAndReloadBrowser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2.7 | |
import remote_webkit_debug | |
chrome = remote_webkit_debug.ChromeShell() | |
tab = chrome.pick_tab([ | |
tab for tab in chrome.get_tabs() | |
if 'webSocketDebuggerUrl' in tab][0]) | |
tab.send_command('Runtime.evaluate', | |
expression='window.location = window.location;', | |
objectGroup='1', | |
returnByValue=True) | |
""" | |
Step 1: | |
pip install remote-webkit-debug | |
Step 2: | |
(defun save-and-reload () "Save and reload browser" (interactive) | |
(save-buffer) | |
(shell-command "chrome-reload") | |
) | |
(define-key global-map "\C-x\C-r" 'save-and-reload) | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment