JavaScript Chrome APIs .cursorrules prompt file
About .cursorrules prompt file
What you can build
Privacy Protector Extension: Develop a Chrome extension that enhances user privacy by blocking tracking scripts and cookies, managing permissions on visited sites, and providing a privacy report. Utilize Chrome dev tools for debugging and implement a user-friendly interface with localization features.
Article Summarizer Tool: Create an extension that extracts key points from online articles and provides concise summaries directly on the page. Employ content scripts to analyze page content and popup scripts to display summaries, ensuring optimized performance and minimal resource usage.
Dark Mode Customizer: An extension that allows users to customize dark mode settings on any website. Utilize content scripts to manipulate CSS styles dynamically, provide a responsive popup UI for user configurations, and enable CSS framework support for enhanced styling.
Tab Management and Organizer: Build a tool that enhances tab management by grouping, renaming, and searching through open tabs. Use Chrome tabs API for operations, storage API for saving tab groups, and develop an intuitive options page for configuration.
Language Learning Aid: Design an extension to translate selected text and provide language learning tips. Utilize Chrome's i18n API for internationalization, and implement functionality using content scripts and secure messaging for translation services.
Eco-Friendly Shopping Assistant: Create an extension that suggests eco-friendly alternatives while shopping online. Use background scripts to handle API requests to a database of eco-friendly products and present notifications or UI enhancements on product pages.
Focus Mode Blocker: Develop a productivity extension that temporarily blocks distracting websites during focus sessions. Implement scheduling with alarms API, use declarative net request for blocking, and provide a customizable focus mode timer in the UI.
Meeting Scheduler Enhancer: Build an extension that integrates with calendar platforms to suggest optimal meeting times based on time zone differences and availability. Use Chrome's storage API for user settings, and a responsive popup for interfacing with calendar data.
Recipe Saver and Organizer: Create an extension for saving and categorizing recipes found online. Employ content scripts for extracting recipe information, storage API for data management, and a popup UI for viewing and organizing saved recipes.
Email Templating System: Develop an extension that integrates with webmail services to provide quick access to reusable templates. Use content scripts for interaction with the email client, storage API for template management, and a configurable options page for template creation.
Benefits
- Emphasizes modular architecture and separation of concerns for maintainability and reusability.
- Prioritizes modern JavaScript features (ES6+) and functional programming patterns.
- Outlines a structured, step-by-step development process with specifics on architecture, testing, and publishing.
Synopsis
Chromium extension developers can leverage this prompt to develop efficient, secure ad-blockers or productivity tools with modern JavaScript, adhering to Chrome's best practices for extensions.
Overview of .cursorrules prompt
The .cursorrules file outlines best practices and guidelines for developing Chrome extensions. It covers various aspects such as code style (emphasizing concise ES6+ JavaScript and modular architecture), naming conventions (camelCase, PascalCase, and uppercase for constants), and usage of modern JavaScript features. It also details how to structure the extension, including manifest files, and the implementation of Chrome APIs while ensuring security and performance. Additionally, it provides steps for the development process, tips for testing and debugging, and preparation for publishing on the Chrome Web Store. The file also encourages using internationalization features and recommends referencing example extensions for learning.