Skip to content

Floyz/linkdingsessionmanager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkTabs - Firefox Extension

A Firefox extension for managing tab sessions with your Linkding bookmark server. LinkTabs allows you to automatically save and open tab bundles, making it easy to organize your browsing sessions.

Features

  • Session Management: Start sessions with bundles to automatically open all bookmarks
  • Auto-tracking: New tabs are automatically added to the active bundle
  • Tab Management: Closing tabs removes them from the bundle
  • Bundle Control: Use the popup or sidebar to manage your sessions
  • Real-time Sync: Changes are synchronized with your Linkding server in real-time

Installation

Prerequisites

  • Firefox browser
  • A running Linkding server instance
  • Linkding API token

Setup Steps

  1. Download the Extension

    • Clone or download this repository
    • Extract the files to a local directory
  2. Install in Firefox

    • Open Firefox
    • Navigate to about:debugging
    • Click "This Firefox"
    • Click "Load Temporary Add-on"
    • Select the manifest.json file from the LinkTabs directory
    • Note: The extension includes an explicit addon ID (linktabs@example.com) to enable storage API functionality
  3. Configure LinkTabs

    • Click the LinkTabs icon in your Firefox toolbar
    • Click "Open Settings" if not configured
    • Enter your Linkding server URL (e.g., https://bookmarks.example.com)
    • Enter your API token (found in your Linkding Settings page)
    • Test the connection and save

Usage

Starting a Session

  1. Via Popup:

    • Click the LinkTabs icon in the toolbar
    • Select a bundle from the list
    • Click "Start Session"
    • All bookmarks in the bundle will open in new tabs
  2. Via Sidebar:

    • Click the LinkTabs icon in the sidebar
    • Browse bundles and their bookmarks
    • Click "Start Session" on any bundle

During a Session

  • Auto-tracking: Any new tabs you open will be automatically added to the active bundle
  • Auto-removal: Closing tabs will remove them from the bundle
  • Session Status: The extension shows which bundle is currently active

Ending a Session

  • Click "End Session" in either the popup or sidebar
  • All tabs associated with the bundle will be closed
  • Tab tracking will stop

Manual Bookmark Management

  • Add Current Tab: Use the sidebar to add the current tab to any bundle
  • Remove Bookmarks: Click the trash icon next to any bookmark in the sidebar
  • View Bookmarks: Expand bundles in the sidebar to see all bookmarks

Configuration

Linkding Server Setup

  1. Install and configure your Linkding server
  2. Create bundles in the Linkding web interface
  3. Add bookmarks to bundles using tags or bundle filters
  4. Get your API token from Settings → API Token

Extension Settings

Access settings by:

  • Right-clicking the LinkTabs icon → Options
  • Or clicking "Open Settings" from the popup/sidebar

Settings Available:

  • Linkding Server URL
  • API Token
  • Connection test

File Structure

LinkTabs/
├── manifest.json              # Extension manifest
├── background/
│   └── background.js          # Background script for tab tracking
├── common/
│   ├── api.js                 # Linkding API client
│   ├── storage.js             # Storage management
│   └── utils.js               # Utility functions
├── popup/
│   ├── popup.html             # Popup interface
│   ├── popup.js               # Popup logic
│   └── popup.css              # Popup styling
├── sidebar/
│   ├── sidebar.html           # Sidebar interface
│   ├── sidebar.js             # Sidebar logic
│   └── sidebar.css            # Sidebar styling
├── options/
│   ├── options.html           # Settings page
│   ├── options.js             # Settings logic
│   └── options.css            # Settings styling
├── icons/
│   ├── icon-16.svg            # Extension icons
│   ├── icon-32.svg
│   ├── icon-48.svg
│   └── icon-128.svg
└── README.md                  # This file

API Integration

LinkTabs integrates with the Linkding REST API:

  • Bundles: GET /api/bundles/ - List all bundles
  • Bookmarks: GET /api/bookmarks/?bundle=<id> - Get bookmarks for a bundle
  • Create Bookmark: POST /api/bookmarks/ - Add new bookmark
  • Delete Bookmark: DELETE /api/bookmarks/<id>/ - Remove bookmark
  • Check Bookmark: GET /api/bookmarks/check/?url=<url> - Check if URL exists

Troubleshooting

Common Issues

  1. "Storage API will not work with a temporary addon ID" Error

    • This is fixed in the current version with explicit addon ID
    • Reload the extension if you see this error
    • The extension now includes linktabs@example.com as the addon ID
  2. "API not configured" Error

    • Go to extension settings
    • Enter your Linkding server URL and API token
    • Test the connection
  3. "Connection test failed"

    • Verify your Linkding server URL is correct
    • Check that your API token is valid
    • Ensure your Linkding server is accessible
  4. Tabs not being tracked

    • Make sure a session is active
    • Check that the tab URL is valid (not internal Firefox pages)
    • Verify the extension has necessary permissions
  5. Bookmarks not syncing

    • Check your internet connection
    • Verify Linkding server is running
    • Check browser console for error messages

Debug Mode

To enable debug logging:

  1. Open Firefox Developer Tools (F12)
  2. Go to Console tab
  3. Look for LinkTabs-related messages

Development

Building from Source

  1. Clone the repository
  2. Make your changes
  3. Load the extension in Firefox using about:debugging

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

License

This project is open source. Please check the license file for details.

Support

For issues and questions:

  1. Check the troubleshooting section above
  2. Review the Linkding API documentation
  3. Open an issue on the project repository

Changelog

Version 1.0.0

  • Initial release
  • Basic session management
  • Popup and sidebar interfaces
  • Auto-tracking of tabs
  • Integration with Linkding API

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages