Skip to content

FearlessSolutions/acronym_plugin

Repository files navigation

Fearless Acronym Extension

This extension adds an icon to the browser bar that, when clicked, displays a search dropdown. When users perform a search, full and partial matches are returned. Users select which acronym files are relevant to them via the extension options.

Acronym Search Box

Setup

  1. Clone or download the acronym project

git clone https://github.com/FearlessSolutions/acronym_plugin.git

  1. In Chrome, navigate to the Extentions page (Window > Extensions).

  2. Verify that "Developer mode" is enabled.

  3. In the upper left, click the "Load unpacked" button.

  4. Select the directory with the acronym project. This will load the extension into your browser

Extension Options

  1. To select which acronyms are used in the extension, navigate to the Extentions page (Window > Extensions)

  2. Click on "Extension options" and a pop-up will display

  3. Select the appropriate acronym sets for your use case

Acronym Extension Options

Using the extension

  1. Click on the Fearless logo in the browser extension toolbar, a dropdown with an input box should display.

  2. Enter the acronym into the input box, the results will return full and partial matches.

Adding new acronym sets

Before adding new files, try to remove duplicates between the new project specific file and the baseline files (fearless.json and software.json).

  1. Add the JSON file to the acronyms project directory. Be sure to format it with consideration to the following information.

    Note that when there are multiple meanings for the same acronym, a new entry should be created

    abbreviation Acronym

    title An individual meaning of the acronym

    description (optional) in future functionality, it would be nice to have additional or contextual information to include

    category (optional) in future functionality, it could be helpful to have more granular classification of the terms

Example:

{
    "abbreviation": "TLA",
    "title": "Three Letter Acronym",
    "description": "This is a longer description of the TLA"
    "category": "Base"
}
  1. Update base.js by adding an entry referencing the new file

    ref id used in the html of the Extension Options setting

    name display name used to reference the acronym set in the Extension Options setting

    default whether to always include the acroynym set in searches. This should more than likely be set to false.

    url absolute URL for the JSON file

Example:

{
    ref: "new-file",
    name: "Display name",
    default: false,
    url:
      "https://URL_TO_FILE/FILENAME.json",
}
  1. Verify!

    • File name displays in the list of Extension Options
    • File can be selected and saved in the Extension Options
    • Acronyms return in the search results when the file is selected in the Extension Options
    • Acronyms do not return when the file is not selected in the Extension Options

Testing

Chrome may give you a hard time about testing the new data sets on your local base.js if you try to change the paths to file:/// prefixes or local machine paths.

An easy way to test on the fly if you have Node's http-server or installed is to call either one with the --cors parameter as shown below. Unfortunately Python's http.server does not appear to have added a simple CORS option.

c:\Projects\acronym_plugin>npm install -g http-server
c:\Projects\acronym_plugin>http-server --cors ./
Starting up http-server, serving ./

http-server version: 14.1.1

http-server settings:
CORS: ./
Available on:
  http://127.0.0.1:8080

Then set the local path in a base.js option to be, for example, http://127.0.0.1:8080/acronyms/cms.json.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published