{"id":24177665,"url":"https://github.com/srishti-56/web-2-brainrot","last_synced_at":"2026-05-04T11:37:41.367Z","repository":{"id":272145960,"uuid":"915657732","full_name":"srishti-56/web-2-brainrot","owner":"srishti-56","description":"Converts any website to an oddly-satisfying browsing experience!","archived":false,"fork":false,"pushed_at":"2025-01-12T13:21:08.000Z","size":17253,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T14:28:37.950Z","etag":null,"topics":["brainrot","chrome","chrome-extension"],"latest_commit_sha":null,"homepage":"https://chromewebstore.google.com/detail/web-2-brainrot/plimemogopfdmlfejdfbmldjaipihafa","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/srishti-56.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"coffeeinspace","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-01-12T13:13:51.000Z","updated_at":"2025-01-12T13:21:11.000Z","dependencies_parsed_at":"2025-01-12T14:28:58.355Z","dependency_job_id":"4fa95115-7e2e-49c4-99c6-9230987f418d","html_url":"https://github.com/srishti-56/web-2-brainrot","commit_stats":null,"previous_names":["srishti-56/web-2-brainrot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srishti-56%2Fweb-2-brainrot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srishti-56%2Fweb-2-brainrot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srishti-56%2Fweb-2-brainrot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/srishti-56%2Fweb-2-brainrot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/srishti-56","download_url":"https://codeload.github.com/srishti-56/web-2-brainrot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241541451,"owners_count":19979121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["brainrot","chrome","chrome-extension"],"created_at":"2025-01-13T04:15:26.679Z","updated_at":"2025-10-05T13:16:25.278Z","avatar_url":"https://github.com/srishti-56.png","language":"JavaScript","funding_links":["https://ko-fi.com/coffeeinspace"],"categories":[],"sub_categories":[],"readme":"# Web2BrainRot Chrome Extension\n\nA Chrome extension that creates an interactive overlay for web content analysis and display. The extension processes webpage content and categorizes text into different sections while providing video playback controls.\n\n:) Try it out here - https://chromewebstore.google.com/detail/web-2-brainrot/plimemogopfdmlfejdfbmldjaipihafa\n\n## Project Structure\n\n### Main Files\n\n- `manifest.json` - The extension configuration file that defines permissions, resources, and metadata\n- `overlay.html` - The main HTML template for the extension's overlay interface\n- `overlay.css` - Styles for the overlay interface\n- `overlay.js` - UI controller for the overlay interface\n- `contentAnalyzer.js` - Content analysis and categorization logic\n- `background.js` - Background script handling extension initialization\n- `content.js` - Content script for webpage interaction\n- `textProcessor.js` - Text processing utilities\n\n### Assets\n- `/assets`\n  - `128.png`, `48.png` - Extension icons\n  - `minecraft-gameplay.mp4` - Sample video file\n  - `web2brainrot-logo.png` - Extension logo\n\n### Data Samples\n- `/data-samples` - Contains sample data files for testing\n  - `substack-homepage-innertext.txt`\n  - `sample_html_page.html`\n\n## Core Files Explained\n\n### overlay.js\nThe main interface controller that handles UI and display logic:\n\n#### Event Listeners\n- `playPauseBtn.addEventListener('click')` - Toggles video playback and text display\n- `likeBtn.addEventListener('click')` - Handles like button interaction\n- `commentBtn.addEventListener('click')` - Handles comment button interaction\n- `closeBtn.addEventListener('click')` - Closes the overlay\n- `gptDetectionBtn.addEventListener('click')` - Toggles GPT analysis mode\n\n#### UI Management Functions\n- `initializeVideoContainer()` - Creates and sets up the video container\n- `createCategoryContainers()` - Creates containers for different content categories\n- `clearContainers()` - Cleans up category containers\n- `startTextDisplay()` - Initiates text display sequence\n- `pauseTextDisplay()` - Pauses text display sequence\n- `displayNextSentence()` - Controls the display of processed text\n\n### contentAnalyzer.js\nCore content analysis to processes webpage content:\n\n#### Analysis Functions\n- `analyzeTextWithGPT(text, element)` - Performs GPT-based text analysis\n- `categorizeText(text, element, useGPT)` - Categorizes text based on context and content\n- `processContent(content)` - Main content processing pipeline\n\n### background.js\nHandles extension initialization and overlay injection:\n\n#### Core Functions\n- `chrome.action.onClicked.addListener()` - Main extension click handler\n- `injectOverlay()` - Creates and injects the overlay interface\n  - Removes existing overlay if present\n  - Creates overlay container\n  - Sets up iframe\n  - Handles click-outside behavior\n\n### content.js\nManages communication between webpage and extension:\n\n#### Message Handling\n- `chrome.runtime.onMessage.addListener()` - Main message handler\n  - Handles 'getPageContent' action\n  - Clones and processes page content\n  - Sends response with page content and base URL\n\n#### Helper Functions\nThe content script primarily uses inline functions within the message listener to:\n- Clone DOM content\n- Process page structure\n- Handle message responses\n\n## Technical Details\n\n### State Management\noverlay.js maintains several important state variables:\n- `isPaused` - Controls text display flow\n- `isInitialized` - Tracks overlay initialization\n- `useGPTAnalysis` - Toggles GPT analysis mode\n- `lastReceivedContent` - Stores last processed content\n- `sentences` - Holds processed text segments\n- `index` - Tracks current display position\n\n### Content Categories\nText is categorized into five main types:\n1. Info - Informational content\n2. Interactive - Clickable elements\n3. Input - Form elements\n4. Navigation - Menu items\n5. Images - Image-related content\n\n### Positioning System\nContent containers are positioned using the `positions` object:\n\n## Setup and Development\n\n1. Clone the repository\n2. Load the extension in Chrome:\n   - Open Chrome Extensions (chrome://extensions/)\n   - Enable Developer Mode\n   - Click \"Load unpacked\"\n   - Select the extension directory\n\n## Usage\n\n1. Click the extension icon on any webpage\n2. Use the overlay controls to:\n   - Play/pause content analysis\n   - Toggle GPT detection\n   - View categorized content\n   - Interact with media controls\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Submit a pull request\n\n## License\n\n[Add your license information here] \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrishti-56%2Fweb-2-brainrot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrishti-56%2Fweb-2-brainrot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrishti-56%2Fweb-2-brainrot/lists"}