Skip to content

ujjwalr27/WikiNavigator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wikipedia Usage Analyzer & Recommender

A Chrome extension that analyzes your Wikipedia reading habits and provides personalized article recommendations based on your interests and reading patterns.

Features

1. Usage Tracking

  • Automatically tracks Wikipedia page visits
  • Measures reading time and engagement
  • Monitors scroll depth to understand reading patterns
  • Extracts article categories for better recommendations
  • Privacy-focused: all data stored locally in your browser

2. Smart Analytics

  • Calculates engagement scores based on multiple factors:
    • Scroll depth (40% weight)
    • Time spent reading (40% weight)
    • Article categories (20% weight)
  • Maintains history of your most recent 100 articles
  • Automatically cleans up old data

3. Intelligent Recommendations

  • Two types of recommendations:
    • Based on your most engaged articles
    • Based on your recent reading
  • Uses Wikipedia's OpenSearch API
  • Caches recommendations for 24 hours
  • Up to 10 recommendations per category

4. User Interface

  • Clean, modern design
  • Two main sections:
    • Recommendations tab
    • Reading History tab
  • Reading statistics dashboard
  • Easy-to-use article cards
  • Responsive design

Installation

  1. Clone or download this repository
  2. Open Chrome and navigate to chrome://extensions/
  3. Enable "Developer mode" in the top right
  4. Click "Load unpacked"
  5. Select the wikipedia-project directory

Usage

  1. Visit any Wikipedia article
  2. The extension will automatically track your reading
  3. Click the extension icon in your browser toolbar to:
    • View personalized recommendations
    • See your reading history
    • Check your reading statistics

Technical Details

File Structure

wikipedia-project/
├── manifest.json        # Extension configuration
├── background.js        # Background service worker
├── contentScript.js     # Wikipedia page script
├── popup.html          # Extension UI
├── popup.js            # UI logic
└── icons/              # Extension icons
    ├── icon16.png
    ├── icon48.png
    └── icon128.png

Components

Content Script

  • Runs on Wikipedia pages
  • Collects reading metrics
  • Tracks user engagement
  • Sends data to background script

Background Script

  • Manages data storage
  • Calculates engagement scores
  • Handles data cleanup
  • Maintains recommendation cache

Popup Interface

  • Displays recommendations
  • Shows reading history
  • Presents usage statistics
  • Handles user interactions

API Usage

The extension uses the Wikipedia OpenSearch API:

  • Endpoint: https://en.wikipedia.org/w/api.php
  • Parameters:
    • action=opensearch
    • format=json
    • limit=10
    • namespace=0

Storage

  • Uses Chrome's local storage API
  • Stores up to 100 most recent visits
  • Caches API responses for 24 hours
  • Automatically cleans up old data

Privacy

This extension:

  • Stores all data locally in your browser
  • Does not send data to any external servers (except Wikipedia API for recommendations)
  • Does not track personal information
  • Does not use cookies or other tracking mechanisms

Requirements

  • Google Chrome browser
  • Permissions:
    • storage: for saving reading history
    • tabs: for accessing current tab information
    • activeTab: for reading current page content
    • host permissions for wikipedia.org

Development

To modify or enhance the extension:

  1. Make changes to the relevant files
  2. Test locally by loading unpacked extension
  3. Refresh the extension in Chrome to see changes

Contributing

Feel free to:

  • Submit bug reports
  • Propose new features
  • Create pull requests
  • Improve documentation

License

This project is open source and available under the MIT License.

Support

For issues, questions, or contributions, please:

  1. Check existing issues in the repository
  2. Create a new issue if needed
  3. Provide detailed information about your problem or suggestion

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published