This Chrome extension extracts itemized order details from a webpage, allows users to assign items to friends, and saves the order state using local storage. It provides an easy way to split bills among friends and calculates individual totals including tax.
- Extracts order items and prices from a webpage.
- Allows users to assign items to friends using checkboxes.
- Saves order states using
localStorage. - Restores selections on page reload.
- Dynamically calculates item splits based on user input.
- Supports tax distribution among friends.
- Clone the repository or download the files.
- Open Chrome and navigate to
chrome://extensions/. - Enable "Developer mode" (toggle at the top right).
- Click "Load unpacked" and select the extension folder.
- The extension will now be available in your browser toolbar.
- Open the order page in your browser.
- Click on the extension icon.
- The popup will display extracted order items.
- Assign items to friends by checking the respective checkboxes.
- Adjust item share values if needed.
- Tax can be split among selected friends.
- Changes are saved automatically and persist across sessions.
Saves selected items per friend into localStorage.
Loads the saved state from localStorage and restores checkbox selections.
Attaches event listeners to checkboxes to update the order state in real-time.
Extracts the order ID from the URL using regex.
- Extracts item details from the page using
chrome.scripting.executeScript. - Parses item names, prices, subtotal, and total.
- Dynamically creates checkboxes and inputs for assigning items to friends.
- Updates individual totals in real-time based on item shares.
- Handles tax distribution among friends.
- Chrome Extensions API
- JavaScript (Vanilla JS, DOM Manipulation, LocalStorage API)