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.
- Clone or download the acronym project
git clone https://github.com/FearlessSolutions/acronym_plugin.git
-
In Chrome, navigate to the Extentions page (Window > Extensions).
-
Verify that "Developer mode" is enabled.
-
In the upper left, click the "Load unpacked" button.
-
Select the directory with the acronym project. This will load the extension into your browser
-
To select which acronyms are used in the extension, navigate to the Extentions page (Window > Extensions)
-
Click on "Extension options" and a pop-up will display
-
Select the appropriate acronym sets for your use case
-
Click on the Fearless logo in the browser extension toolbar, a dropdown with an input box should display.
-
Enter the acronym into the input box, the results will return full and partial matches.
Before adding new files, try to remove duplicates between the new project specific file and the baseline files (fearless.json and software.json).
-
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
Acronymtitle
An individual meaning of the acronymdescription
(optional) in future functionality, it would be nice to have additional or contextual information to includecategory
(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"
}
-
Update
base.js
by adding an entry referencing the new fileref
id used in the html of the Extension Options settingname
display name used to reference the acronym set in the Extension Options settingdefault
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",
}
-
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
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
.