Skip to content

Commit abf1f48

Browse files
authored
Expanded extension docs (#97)
1 parent a4d8902 commit abf1f48

File tree

11 files changed

+5565
-4359
lines changed

11 files changed

+5565
-4359
lines changed

crx/background.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
chrome.runtime.onInstalled.addListener(function (details) {
2+
if (details.reason == "install") {
3+
chrome.tabs.create({
4+
url: "https://rviscomi.github.io/capo.js/user/extension/?utm_source=installed&utm_medium=extension&utm_campaign=capo",
5+
});
6+
}
7+
});

crx/manifest.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"manifest_version": 3,
33
"name": "Capo: get your ﹤𝚑𝚎𝚊𝚍﹥ in order",
44
"description": "Visualize the optimal ordering of ﹤𝚑𝚎𝚊𝚍﹥ elements on any web page",
5-
"version": "1.4.6",
5+
"version": "1.4.7",
66
"permissions": [
77
"scripting",
88
"activeTab",
@@ -13,6 +13,9 @@
1313
"default_popup": "capo.html"
1414
},
1515
"options_page": "options/options.html",
16+
"background": {
17+
"service_worker": "background.js"
18+
},
1619
"content_security_policy": {
1720
"extension_pages": "default-src 'self'; style-src 'self';"
1821
},

docs/astro.config.mjs

Lines changed: 45 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,88 +1,89 @@
1-
import { defineConfig } from 'astro/config';
2-
import starlight from '@astrojs/starlight';
1+
import { defineConfig } from "astro/config";
2+
import starlight from "@astrojs/starlight";
33

44
export default defineConfig({
5-
site: 'https://rviscomi.github.io',
6-
base: '/capo.js',
7-
experimental: {
8-
assets: true
9-
},
5+
site: "https://rviscomi.github.io",
6+
base: "/capo.js",
107
integrations: [
118
starlight({
12-
title: 'capo.js',
9+
title: "capo.js",
1310
head: [
1411
{
15-
tag: 'script',
12+
tag: "script",
1613
attrs: {
1714
async: true,
18-
src: 'https://www.googletagmanager.com/gtag/js?id=G-4BD76ZZBR6'
19-
}
15+
src: "https://www.googletagmanager.com/gtag/js?id=G-4BD76ZZBR6",
16+
},
2017
},
2118
{
22-
tag: 'script',
19+
tag: "script",
2320
content: `
2421
window.dataLayer = window.dataLayer || [];
2522
function gtag(){dataLayer.push(arguments);}
2623
gtag('js', new Date());
2724
28-
gtag('config', 'G-4BD76ZZBR6');`
25+
gtag('config', 'G-4BD76ZZBR6');`,
2926
},
3027
{
31-
tag: 'meta',
28+
tag: "meta",
3229
attrs: {
33-
property: 'og:image',
34-
content: 'https://rviscomi.github.io/capo.js/capo-social-alt.webp'
35-
}
36-
}
30+
property: "og:image",
31+
content: "https://rviscomi.github.io/capo.js/capo-social-alt.webp",
32+
},
33+
},
3734
],
3835
social: {
39-
github: 'https://github.com/rviscomi/capo.js',
40-
twitter: 'https://twitter.com/rick_viscomi',
36+
github: "https://github.com/rviscomi/capo.js",
37+
twitter: "https://twitter.com/rick_viscomi",
4138
},
4239
editLink: {
43-
baseUrl: 'https://github.com/rviscomi/capo.js/edit/main/docs/'
40+
baseUrl: "https://github.com/rviscomi/capo.js/edit/main/docs/",
4441
},
4542
sidebar: [
4643
{
47-
label: 'Home',
48-
link: '/'
44+
label: "Home",
45+
link: "/",
4946
},
5047
{
51-
label: 'Demo 🚀',
52-
link: '/user/demo/'
48+
label: "Demo 🚀",
49+
link: "/user/demo/",
5350
},
5451
{
55-
label: 'Getting started',
52+
label: "Getting started",
5653
items: [
57-
{ label: 'Quick start', link: '/user/quick-start/' },
58-
{ label: 'Rules', link: '/user/rules/' },
59-
{ label: 'Improve performance', link: '/user/performance/' },
60-
{ label: 'Interpret results', link: '/user/actionability/' },
61-
{ label: 'Static vs dynamic assessment', link: '/user/assessment-mode/' },
62-
{ label: 'Validation', link: '/user/validation/' },
63-
{ label: 'Configuration', link: '/user/config/' },
54+
{ label: "Quick start", link: "/user/quick-start/" },
55+
{ label: "Rules", link: "/user/rules/" },
56+
{ label: "Improve performance", link: "/user/performance/" },
57+
{ label: "Interpret results", link: "/user/actionability/" },
58+
{
59+
label: "Static vs dynamic assessment",
60+
link: "/user/assessment-mode/",
61+
},
62+
{ label: "Validation", link: "/user/validation/" },
63+
{ label: "Configuration", link: "/user/config/" },
6464
],
6565
},
6666
{
67-
label: 'User guides',
67+
label: "User guides",
6868
items: [
69-
{ label: 'Extension', link: '/user/extension/' },
70-
{ label: 'Snippet', link: '/user/snippet/' },
71-
{ label: 'WebPageTest', link: '/user/webpagetest/' },
72-
{ label: 'BigQuery', link: '/user/bigquery/' },
69+
{ label: "Extension", link: "/user/extension/" },
70+
{ label: "Snippet", link: "/user/snippet/" },
71+
{ label: "WebPageTest", link: "/user/webpagetest/" },
72+
{ label: "BigQuery", link: "/user/bigquery/" },
7373
],
7474
},
7575
{
76-
label: 'Developer guides',
76+
label: "Developer guides",
7777
items: [
78-
{ label: 'Contributing to Capo', link: '/developer/contributing/' },
79-
{ label: 'Installing the extension locally', link: '/developer/crx-local/' },
78+
{ label: "Contributing to Capo", link: "/developer/contributing/" },
79+
{
80+
label: "Installing the extension locally",
81+
link: "/developer/crx-local/",
82+
},
8083
],
8184
},
8285
],
83-
customCss: [
84-
'/src/styles/custom.css',
85-
],
86+
customCss: ["/src/styles/custom.css"],
8687
}),
8788
],
8889
});

0 commit comments

Comments
 (0)