Terms Guardian is a web browser extension designed to empower users by demystifying the complex language often found in Terms of Service (ToS) agreements. It automatically detects ToS text on websites, grades its readability, summarizes its content into plain language, and assesses the rights retained or surrendered.
- ToS Detection: Automatically detects when you're viewing a Terms of Service agreement.
- Summary Generation: Provides a concise summary of the ToS in plain language.
- Readability Grade: Grades the ToS text for language complexity using one readability algorithm (Flesch-Kincaid Readability).
- Rights Retention Grade: Grades the ToS based on how much freedom or rights are retained or taken, using a sophisticated TensorFlow.js language model.
- Enhanced Readability Grading: Utilizes additional algorithms (Dale-Chall Readability and Gunning Fog Index) for a more comprehensive language difficulty assessment.
- Uncommon Word Definitions: Provides definitions for uncommon words or excerpts that significantly contribute to the grades.
- Detects and highlights legal agreements on web pages
- Extracts relevant legal text for easy reading
- Opens a side panel with detailed information when activated
- Clone this repository or download the source code.
- Open your browser's extension management page:
- Chrome:
chrome://extensions
- Firefox:
about:addons
- Chrome:
- Enable "Developer mode" (usually a toggle in the top right corner).
- Click "Load unpacked" (Chrome) or "Load Temporary Add-on" (Firefox).
- Select the directory containing the extension files.
Terms Guardian can be activated in three ways:
- Context Window: Right-click on highlighted text and select the Terms Guardian option from the context menu.
- Popup Notification: Click on the popup notification that appears when a legal agreement is detected on a page.
- Extension Icon: Click the Terms Guardian icon in the browser's toolbar.
Once activated, a side panel will open, displaying:
- The extracted legal text (if applicable)
- A summary of the legal document
- Readability grades
- Rights retention assessment
- Additional information about the detected agreement
background.js
: Handles background processes and communication between componentscontent.js
: Detects and highlights legal text on web pagespopup.js
: Manages the extension's popup interfacetextExtractor.js
: Extracts relevant legal text from web pagessummarizer.js
: Generates summaries of legal documentsreadabilityGrader.js
: Calculates readability scores using various algorithmsrightsAssessor.js
: Evaluates the rights retention based on the ToS contentstyles.css
: Defines styles for highlighted text and the popup interface
The extension requires the following permissions:
activeTab
: To access and modify the content of the active tabnotifications
: To display notifications when legal agreements are detectedtabs
: To interact with browser tabsscripting
: To inject content scripts into web pages
Contributions to Terms Guardian are welcome! Please follow these steps:
- Fork the repository
- Create a new branch for your feature or bug fix
- Make your changes and commit them with descriptive commit messages
- Push your changes to your fork
- Submit a pull request to the main repository
MIT License