Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

feat(chrome-ext): Improve onboarding experience (#1375)

Elijah Potter5225f09b06f5
diff --git a/packages/chrome-plugin/src/background/index.ts b/packages/chrome-plugin/src/background/index.ts
index 41768ff29..4af4f0545 100644
--- a/packages/chrome-plugin/src/background/index.ts
+++ b/packages/chrome-plugin/src/background/index.ts
@@ -26,6 +26,7 @@ console.log('background is running');
chrome.runtime.onInstalled.addListener((details) => {
if (details.reason === chrome.runtime.OnInstalledReason.INSTALL) {
chrome.runtime.setUninstallURL('https://writewithharper.com/uninstall-browser-extension');
+ chrome.tabs.create({ url: 'https://writewithharper.com/install-browser-extension' });
}
});
@@ -54,7 +55,8 @@ async function enableDefaultDomains() {
'froala.com',
'playground.lexical.dev',
'discord.com',
- 'youtube.com',
+ 'www.youtube.com',
+ 'www.google.com',
'www.instagram.com',
'web.whatsapp.com',
'outlook.live.com',
@@ -70,6 +72,7 @@ async function enableDefaultDomains() {
'hashnode.com',
'www.slatejs.org',
'localhost',
+ 'writewithharper.com',
];
for (const item of defaultEnabledDomains) {
diff --git a/packages/web/src/routes/install-browser-extension/+page.svelte b/packages/web/src/routes/install-browser-extension/+page.svelte
new file mode 100644
index 000000000..c1dfcd68f
--- /dev/null
+++ b/packages/web/src/routes/install-browser-extension/+page.svelte
@@ -0,0 +1,51 @@
+<script lang="ts">
+import { Textarea } from 'flowbite-svelte';
+let demoText =
+ 'Ths is an text box you can type in.\n\nany other site on the web will work the the same!';
+</script>
+
+<div class="fixed left-0 top-0 w-screen h-screen bg-white dark:bg-black z-1000">
+ <div class="max-w-6xl mx-auto shadow-md border-gray-300 dark:border-x h-full overflow-y-auto">
+ <section class="px-6 sm:px-10 py-16 sm:py-24">
+ <h1 class="text-center font-bold text-primary text-4xl sm:text-6xl leading-tight mb-6">
+ Thanks for Installing Harper!
+ </h1>
+
+ <p class="text-center text-lg sm:text-xl mb-4 max-w-3xl mx-auto">
+ Writing is hard. Writing well is harder. Now that Harper is available on most websites you visit, it should be a little easier.
+ </p>
+
+ <h2 class="text-center text-3xl mb-4 font-bold max-w-3xl mx-auto">
+ Here's How It Works:
+ </h2>
+
+ <div class="grid grid-cols-3 gap-4 mb-2">
+ <div class="p-4 border rounded-xl shadow-md">
+ <p class="font-semibold py-0">1. Launch Any Site</p>
+ <p>Harper plugs right into the page of any site you visit.</p>
+ </div>
+ <div class="p-4 border rounded-xl shadow-md">
+ <p class="font-semibold py-0">2. Type Naturally</p>
+ <p>When Harper notices an error in your work, it'll underline it.</p>
+ </div>
+ <div class="p-4 border rounded-xl shadow-md">
+ <p class="font-semibold py-0">3. Review & Accept</p>
+ <p>Tap the underline to fix the problem.</p>
+ </div>
+ </div>
+
+
+ <h2 class="text-center text-3xl mb-4 font-bold max-w-3xl mx-auto">
+ Give It a Whirl!
+ </h2>
+
+ <div class="md:col-span-2 relative">
+ <Textarea
+ rows={10}
+ bind:value={demoText}
+ class="w-full rounded-lg border border-base-300 focus:ring-4 focus:ring-primary/30 transition text-xl!"
+ />
+ </div>
+ </section>
+ </div>
+</div>