Skip to content

Commit

Permalink
Edit extension details
Browse files Browse the repository at this point in the history
  • Loading branch information
jflheureux committed Nov 13, 2023
1 parent 6c52154 commit 7638e08
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
fetch-depth: 0
- name: Setup Git
run: |
git config --global user.name "stateful-wombot"
git config --global user.email "christian+github-bot@stateful.com"
git config --global user.name "jflheureux"
git config --global user.email "sitecore_xm_cloud_extensions@outlook.com"
- name: Install
run: npm ci
- name: Bundle
Expand Down
43 changes: 31 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
# My Web Extension
# Sitecore XM Cloud Extensions

> This is a starter kit for building cross platform browser extensions. You can use it as a template for your project. It comes with a [Vite](https://vitejs.dev/) + [WebdriverIO](https://webdriver.io) setup for building and testing extension popup modals, content and background scripts. Read more about building cross platform browser extensions in our [corresponding blog post](https://stateful.com/blog/building-cross-browser-web-extensions).
Sitecore XM Cloud Extensions is a browser extension that improves Sitecore XM Cloud user experience.

A browser web extension that works on Chrome, Firefox and Safari. Download the extension on the marketplaces:
It is a work in progress with only one feature for the moment.

- Chrome:: https://chrome.google.com/webstore/detail/my-web-extension/lnihnbkolojkaehnkdmpliededkfebkk
- Firefox: https://addons.mozilla.org/en-GB/firefox/addon/my-web-extension/
- Safari: _(not yet supported, see [`stateful/web-extension-starter-kit#1`](https://github.com/stateful/web-extension-starter-kit/issues/1))_
## Features

- Connecting XM Cloud Pages to your local XM Cloud instance

## Download

Download the extension on the marketplaces:

- Chrome:
- Firefox:
- Edge:
- Safari:

## Author

[Jeff L'Heureux](https://www.jflh.ca/aboutme)

## Contributions

Questions, suggestions and contributions are welcome in the form of GitHub issues and pull requests. Please sync with the author before starting any feature in case they already started a similar feature.

## Development

The NPM scripts are adapted to work on Windows.

### Setup

Install dependencies via:
Expand Down Expand Up @@ -43,6 +63,8 @@ npm run build

This script will bundle the extension as `web-extension-chrome-vX.X.X.crx` and `web-extension-firefox-vX.X.X.zip`. The generated files are in `dist/`. You can also grab a version from the [latest test](https://github.com/stateful/web-extension-starter-kit/actions/workflows/test.yml) run on the `main` branch.

### Load in the Browser

#### Load in Firefox

To load the extension in Firefox go to `about:debugging#/runtime/this-firefox` or `Firefox > Preferences > Extensions & Themes > Debug Add-ons > Load Temporary Add-on...`. Here locate the `dist/` directory and open `manifestv2.json`
Expand All @@ -67,10 +89,7 @@ Run e2e tests:
npm run test:e2e
```

## Files:

- content-script - UI files
- background.ts - Background script/Service worker
- index.html - popup UI
## Files

If you have any questions feel free to open an issue.
- background\background.ts - Background script/Service worker
- popup\index.html - popup UI
2 changes: 1 addition & 1 deletion background/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Web Extension Background</title>
<title>Sitecore XM Cloud Extensions Background</title>
</head>
<body>
<script type="module" src="./index.ts"></script>
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"name": "my-web-extension",
"version": "0.0.0",
"description": "A web extension that works in all browser.",
"author": "Christian Bromann <christian@stateful.com>",
"name": "sitecore-xm-cloud-extensions",
"version": "1.0.0",
"description": "Browser extension that improves Sitecore XM Cloud user experience.",
"author": "Jeff L'Heureux <sitecore_xm_cloud_extensions@outlook.com>",
"license": "MIT",
"type": "module",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion popup/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Web Extension Frontend</title>
<title>Sitecore XM Cloud Extensions Popup</title>
<script type="module" src="./index.tsx"></script>
</head>
<body id="extension-root">
Expand Down
12 changes: 6 additions & 6 deletions public/manifest.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"manifest_version": 3,
"name": "My Web Extension",
"author": "my@email.com",
"description": "A cross browser web extension.",
"homepage_url": "https://projectUrl.com",
"version": "0.0.0",
"name": "Sitecore XM Cloud Extensions",
"author": "sitecore_xm_cloud_extensions@outlook.com",
"description": "Browser extension that improves Sitecore XM Cloud user experience.",
"homepage_url": "https://github.com/jflheureux/Sitecore-XM-Cloud-Extensions",
"version": "1.0.0",
"background": {
"service_worker": "./background/background.js"
},
"action": {
"default_popup": "./popup/index.html",
"default_title": "Open the popup"
"default_title": "Open Sitecore XM Cloud Extensions"
},
"browser_specific_settings": {
"gecko": {
Expand Down
12 changes: 6 additions & 6 deletions public/manifestv2.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"manifest_version": 2,
"name": "My Web Extension",
"author": "my@email.com",
"description": "A cross browser web extension.",
"homepage_url": "https://projectUrl.com",
"version": "0.0.0",
"name": "Sitecore XM Cloud Extensions",
"author": "sitecore_xm_cloud_extensions@outlook.com",
"description": "Browser extension that improves Sitecore XM Cloud user experience.",
"homepage_url": "https://github.com/jflheureux/Sitecore-XM-Cloud-Extensions",
"version": "1.0.0",
"background": {
"page": "./background/index.html",
"persistent": false
},
"browser_action": {
"default_area": "navbar",
"default_popup": "./popup/index.html",
"default_title": "Open the popup",
"default_title": "Open Sitecore XM Cloud Extensions",
"default_icon": "icon-72x72.png"
},
"permissions": [
Expand Down
2 changes: 1 addition & 1 deletion vite.chrome.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default defineConfig({
lib: {
formats: ['iife'],
entry: path.resolve(__dirname, 'background', 'index.ts'),
name: 'Cat Facts'
name: 'Sitecore XM Cloud Extensions'
},
rollupOptions: {
output: {
Expand Down

0 comments on commit 7638e08

Please sign in to comment.