2.0.0 • Published 6 years ago

@vk-x/inject v2.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

inject

For use inside Chrome extensions. Injects scripts into the page context.

inject = require("@vk-x/inject")

// File name will be resolved with chrome.extension.getURL()
inject("path/to/file.js")

// Pass true as the second argument to inject the string itself as code.
inject("console.log('Inline code')", true)

// Functions are automatically stringified and wrapped into an IIFE.
inject(function() { console.log("I'm injected!") })
2.0.0

6 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago