Skip to content

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.
  • Input Area:
    • A prompt > followed by a text field for entering expressions. Press Enter to evaluate.

Basic Usage

  1. Click the JS Calc extension icon in your Chrome toolbar to open the popup.
  2. Type your mathematical expression into the input field.
  3. Press Enter.
  4. The input and its result (or an error) appear in the Output Area.
  5. 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 and Down Arrow keys to cycle through your command history.

Copying Results

  • Hold Ctrl (or Cmd 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.