Open
Description
We made snippets (among other settings) available from incognito. I think this change landed in Chrome stable around 46/47 or so.
As a result, they are no longer available in localStorage
. Here's the new technique. These are run from a devtools-on-devtools window.
getting snippets
InspectorFrontendHost.getPreferences(_ => console.log(JSON.parse(_.scriptSnippets)))
setting snippets
InspectorFrontendHost.setPreference("scriptSnippets", JSON.stringify(yourSnippets))
FWIW, InspectorFrontendHost.getPreferences
will return everything that has migrated to the incognito-available settings (most things), while a few items (like breakpoints) remain in the devtools' localStorage
Tagging a few other issues that use this technique:
- Figure out how to cache / store / update snippets better #6
- Is that possible to store snippets in files and load into Chrome? bgrins/devtools-snippets#28
- Developer Tools Import/Export Snippet for Google Chrome bgrins/devtools-snippets#35
- http://stackoverflow.com/questions/19025718/which-file-does-snippets-of-chrome-dev-tool-saved-at