I'm used to making Greasemonkey scripts for Firefox, where I can edit the script while it's in the user profile, refresh, and see changes immediately.
I know that Chrome supports Greasemonkey s开发者_如何学Ccripts without needing the actual Greasemonkey plugin. Is it possible to do the same in-place script editing? If so, what is the path to the extension script?
Thanks.
You can go to developer tools, and use the 'Scripts' tab to directly edit the source of scripts. On Mac, Command + S works to "save" the script, although it doesn't seem to persist anywhere that I can find. I usually set a breakpoint since that seems to make chrome retain my changes even after a page refresh.
If you edit the extension in the default directory structure, changes and especially additions are wiped the next time Chrome restarts.
But if you setup a custom work environment, then you can edit-in-place, quite nicely.
See this answer.
精彩评论