- The extension wouldn't have been benefited by utilization of a framework like Next.js or react at this demonstration level, so It has been omitted.
- There is a way to include user-identity in the extension using the Chrome Web Store IDs as the Client ID for the extension, but it is not free and requires a Developer Account, and so hasn't been implemented. Instead, it is generated by chrome's extension devtools.
- The calculated Extension ID is :
hhmkanjkpifpnojlmgkkgdkhdnkhhhji
- OAuthClientID:
583176469710-psrn8f83nvojpdab0kuiv4s790gvh0eo.apps.googleusercontent.com
- The extension is kept very basic as to not use up a lot of time.
chrome.runtime.onInstalled is used to create a new collection if needed, a default doc is required so we simply put in a address of google.
The extension has a simple index page, and a service worker, both of which are entrypoints to vite.
index is the popup, contains the necessary code for saving a link and deleting it, and viewing the previously saved links
a private key, dist.pem is provided for signing the extension.
chrome.identity is used to get the user auth id, and is saved in the chrome.storage.sync zone for easy use.
we simply reload the page on any successful action as that allows the DB to be completely in sync with the app.
-
Clone or degit the repository
git clone https://github.com/DevParapalli/ChromeExtension0.git
OR
npx -y degit https://github.com/DevParapalli/ChromeExtension0.git
-
Go to the chrome extensions page : chrome://extensions
-
Turn on developer mode, there should be a toggle on the left side of the page.
-
In the repository folder, run
pnpm install pnpm run build
-
In the chrome extensions page, look for the button that says
Load Unpacked
. Click it and select thedist/
folder in the pop-up that opens. -
Once installed, you will need to sign in to the extension, a window will automatically pop up and allow you to sign in.
-
Navigate to any other page, and use the extension as intended.
Assignment for Solocl Internship