Skip to content

Simplify injecting an element #2

@sindresorhus

Description

@sindresorhus

From refined-github/refined-github#12 (comment).

I'm thinking maybe a method that accepts a CSS selector and an element/string and injects on load and when there's a mutation, but also checks that it doesn't already exist, which can happen when you click the back button in the browser because of caching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions