Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

snippets are no longer available via localStorage #23

Open
@paulirish

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:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /