User Interface, Basic Usage & Workflow
User Interface
The JS Calc interface is designed for clarity and efficiency, consisting of three main parts:
- Top Bar:
- Title: "JS Calculator" (customizable via Options).
- Clear Link: Resets the calculator's history, variables, and user-defined functions.
- Options Link: Opens the extension's options page.
- Help Link: Opens this documentation.
- Pop-out Button (↗): Opens the calculator in a new, resizable window.
- Output Area:
- A scrollable display of all inputs (prefixed with
>
) and their results or error messages.
- A scrollable display of all inputs (prefixed with
- Input Area:
- A prompt
>
followed by a text field for entering expressions. PressEnter
to evaluate.
- A prompt
Basic Usage
- Click the JS Calc extension icon in your Chrome toolbar to open the popup.
- Type your mathematical expression into the input field.
- Press
Enter
. - The input and its result (or an error) appear in the Output Area.
- The input field clears, ready for your next calculation.
Workflow & Interactions
JS Calc offers several features to streamline your calculations:
History Navigation & Reuse
- The output area is scrollable to view past calculations.
- Clicking an Input Line: Click any previous input line (text starting with
>
) to copy that expression back into the input field for editing or re-evaluation. - Clicking a Result Line: Click directly on a result line to insert its numerical value into the input field.
- Arrow Key History: In the input field, use the
Up Arrow
andDown Arrow
keys to cycle through your command history.
Copying Results
- Hold
Ctrl
(orCmd
on Mac) and click on any result line. - The value is copied to your clipboard. The title bar briefly shows "Copied!" or "Copy Failed!".
Clearing State
- Click the "Clear" link in the top bar to:
- Clear the visible output history.
- Delete all stored variables and user-defined functions.
- Reset the last answer variable (
@
).
Pop-out Window
- Click the pop-out icon (↗) to open the calculator in a new, independent, resizable window. This is great for keeping the calculator accessible while working in other tabs.