Created
January 27, 2020 18:24
-
-
Save bialikover/d9dbf89ad42a40386b5744dfba7d4ce9 to your computer and use it in GitHub Desktop.
Export/Import chrome devtools snippets
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
// Open devtools undocked, then inspect that devtools again | |
// Run in the secondary console | |
let exportSnippets; | |
InspectorFrontendHost.getPreferences(_ => { exportSnippets = JSON.parse(_.scriptSnippets); }); | |
// now you can: copy(exportSnippets); | |
// import back in | |
let importSnippets = [ /* paste snippets */ ]; | |
InspectorFrontendHost.setPreference("scriptSnippets", JSON.stringify(importSnippets)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment