Skip to content

Instantly share code, notes, and snippets.

@ljmotta
Last active October 13, 2020 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ljmotta/762132005e10d3222401ec8d45ad80db to your computer and use it in GitHub Desktop.
Save ljmotta/762132005e10d3222401ec8d45ad80db to your computer and use it in GitHub Desktop.
Base64Png Chrome Extension Content Script
import { startExtension } from "@kogito-tooling/chrome-extension";
// String replaced by Webpack using the 'string-replace-loader'
const resourcesPathPrefix = "$_{WEBPACK_REPLACE__targetOrigin}";
startExtension({
name: "Kogito Base64 PNG React Editor",
extensionIconUrl: chrome.extension.getURL("/resources/kie-icon.png"),
githubAuthTokenCookieName: "github-oauth-token-base64-editors",
editorEnvelopeLocator: {
targetOrigin: window.location.origin,
mapping: new Map([
[
"base64png",
{
resourcesPathPrefix: `${resourcesPathPrefix}/dist/`,
envelopePath: `${resourcesPathPrefix}/dist/envelope/index.html`,
},
],
]),
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment