Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added API documentation and setup steps #453

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,46 @@ git push -u origin <your_branch_name>

**15.** And you are done creating a pull request to this project. Be patient while your PR is reviewed.

<b> <h3> Tips to begin a new extension.</b> </h3> <b>How to start building a new extension:</b>

**1.** Create a manifest.json files, this should have the manifest_version, description, name, version. Use this link to guide you
Link: https://web.dev/articles/add-manifest

**2.** Now that the basics are setup you can add relevant JavaScript and CSS files to build the core of the project.

**3.** Once finished with development go to chrome settings, more tools, extensions and turn on developer mode. Once done click load unpack to place extension in chrome store.

<b> <h3></b> </h3> <b>Helpful details for chrome API's used in projects in repo:</b>

**1.** action: This will allow you to control how the extension interacts when placed on the tool bar.
Include action keyword in manifest. setIcon() is used to set icon in the toolbar.

**2.** audio: This will let your extension see what audio devices are connected to the device.
isActive boolean will let you see what devices are on. Display names are places in a string array.

**3.** browsingData: Allows extension to modify user history on chrome.
Give browsingData permissions in the manifest file. Make sure to use a returned promise while process is happening in the background to account for delay.

**4.** commands: Use this to link bindings with your keys to the extension.
Keys are seperated into alpha keys, numeric jets, standard key, and modifier keys. Places keys into a command declaration to create a command.

**5.** documentScan: This can retrieve data from scanned images.
Items such as URL that are scanned are stored in a string array. Rest of data scanned is stored in RESULTS. Only 1 image can be scanned at a time.

**6.** networkingAttributes: Gives network data that is collected from chrome.
Stores iv4, ipv6, and MAC address in strings. These can be retrieved using the getNewotkDetails method.

**7.** fontSettings: Used to edit the fonts in tabs.
Using the getFont method with constraints of family type and script you can get the current font. setFont() sets the font with the same comstraints. fonts are organized by fontID.

**8.** pageCapture: Saves a page as a MHTML file.
Add pageCapture permissions to the manifest file. saveAsMHTML() function calls the request. The capture is stored in a details objects with a unique id.

**9.** printing: Allows for extensions to connect to a printing device and perform print jobs.
Functions include cancelJob, submitJob, getPrinters, and getPrinterInfo. Size of print job can be modified through max_height_microns, min_height_microns, and width_microns.

**10.** search: Lets the extension use default browsing platform to search.
results from search are stored in queryInfo. To choose what tab to perform query you can use tabId or current tab using CURRENT_TAB.


<br>
Expand Down