{"id":30018193,"url":"https://github.com/ascndia/szuru-browser-extension","last_synced_at":"2025-08-05T23:59:52.183Z","repository":{"id":308189050,"uuid":"1031945549","full_name":"ascndia/szuru-browser-extension","owner":"ascndia","description":"A Chrome/Edge browser extension for uploading images directly to Szurubooru with right-click context menu.","archived":false,"fork":false,"pushed_at":"2025-08-04T15:28:12.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-04T19:19:25.932Z","etag":null,"topics":["chrome","extension","szurubooru"],"latest_commit_sha":null,"homepage":"","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/ascndia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"zenodo":null}},"created_at":"2025-08-04T15:10:09.000Z","updated_at":"2025-08-04T15:29:07.000Z","dependencies_parsed_at":"2025-08-04T19:24:58.950Z","dependency_job_id":"319ae6e6-d8c0-439e-8a47-ff39cf479191","html_url":"https://github.com/ascndia/szuru-browser-extension","commit_stats":null,"previous_names":["ascndia/szuru-browser-extension"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ascndia/szuru-browser-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascndia%2Fszuru-browser-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascndia%2Fszuru-browser-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascndia%2Fszuru-browser-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascndia%2Fszuru-browser-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ascndia","download_url":"https://codeload.github.com/ascndia/szuru-browser-extension/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ascndia%2Fszuru-browser-extension/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268994656,"owners_count":24341578,"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","status":"online","status_checked_at":"2025-08-05T02:00:12.334Z","response_time":2576,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chrome","extension","szurubooru"],"created_at":"2025-08-05T23:59:50.410Z","updated_at":"2025-08-05T23:59:52.164Z","avatar_url":"https://github.com/ascndia.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Szurubooru Browser Extension\n\nA Chrome/Edge browser extension for uploading images directly to Szurubooru with right-click context menu.\n\n## Features\n\n- 🖱️ **Right-click upload**: Right-click any image and select \"Upload to Szurubooru\"\n- 🏷️ **Tag input modal**: Easy-to-use popup for entering tags and safety rating\n- ⚙️ **Settings management**: Configure server URL, username, and API token\n- 🔐 **Secure storage**: Credentials stored locally in browser\n- ✅ **Connection testing**: Test your settings before using\n- 📱 **Responsive design**: Works on all screen sizes\n\n## Installation\n\n### Method 1: Load Unpacked (Development)\n\n1. **Open Chrome/Edge Extensions page**:\n\n   - Chrome: `chrome://extensions/`\n   - Edge: `edge://extensions/`\n\n2. **Enable Developer Mode** (toggle in top-right)\n\n3. **Load the extension**:\n\n   - Click \"Load unpacked\"\n   - Select the `szuru-browser-extension` folder\n\n4. **The extension is now installed!** You should see the Szurubooru icon in your toolbar.\n\n### Method 2: Package as .crx (Production)\n\n1. Go to `chrome://extensions/`\n2. Click \"Pack extension\"\n3. Select the `szuru-browser-extension` folder\n4. This creates a `.crx` file you can distribute\n\n## Setup\n\n### 1. Configure Settings\n\n1. **Click the extension icon** in your browser toolbar\n2. **Fill in your Szurubooru details**:\n\n   - **Server URL**: Your Szurubooru server (e.g., `http://localhost:8080`)\n   - **Username**: Your Szurubooru username\n   - **API Token**: Get this from your Szurubooru user settings\n\n3. **Click \"Test Connection\"** to verify your settings\n4. **Click \"Save Settings\"** when everything works\n\n### 2. Get API Token\n\n1. Log into your Szurubooru web interface\n2. Go to **Settings** → **Account**\n3. Find the **API Tokens** section\n4. **Create a new token** or copy existing one\n5. **Paste the token** into the extension settings\n\n## Usage\n\n### Upload an Image\n\n1. **Right-click any image** on any webpage\n2. **Select \"Upload to Szurubooru\"** from context menu\n3. **Fill in the upload form**:\n   - **Tags**: Enter comma-separated tags (required)\n   - **Safety**: Choose safe/sketchy/unsafe\n4. **Click \"Upload\"** to submit\n\n### Example Workflow\n\n```\n1. Browse to any website with images\n2. Right-click an image\n3. Click \"Upload to Szurubooru\"\n4. Enter tags: \"anime, girl, blue_hair\"\n5. Select safety: \"safe\"\n6. Click \"Upload\"\n7. ✓ Success: \"Successfully uploaded as post #123\"\n```\n\n## File Structure\n\n```\nszuru-browser-extension/\n├── manifest.json          # Extension manifest\n├── background.js          # Service worker for context menus\n├── content.js            # Content script for modal\n├── modal.css             # Styles for upload modal\n├── popup.html            # Settings popup HTML\n├── popup.js              # Settings popup logic\n├── icons/                # Extension icons\n│   ├── icon16.png\n│   ├── icon48.png\n│   └── icon128.png\n└── README.md             # This file\n```\n\n## Technical Details\n\n### Permissions Used\n\n- **`contextMenus`**: Create right-click menu for images\n- **`activeTab`**: Access current tab for modal injection\n- **`storage`**: Store user settings locally\n- **`tabs`**: Communication between scripts\n- **`host_permissions`**: Access any website for image uploads\n\n### Security\n\n- ✅ **Local storage only**: Credentials never leave your browser\n- ✅ **HTTPS support**: Works with secure connections\n- ✅ **Token-based auth**: Uses API tokens, not passwords\n- ✅ **Content Security Policy**: Follows Chrome security guidelines\n\n## Troubleshooting\n\n### Extension doesn't appear in context menu\n\n- Check if extension is enabled in `chrome://extensions/`\n- Try refreshing the webpage\n- Make sure you're right-clicking on an actual image\n\n### Upload fails with 401/403 error\n\n- Check your username and API token in settings\n- Test connection in settings popup\n- Verify your Szurubooru account has upload permissions\n\n### Upload fails with 404 error\n\n- Check your server URL in settings\n- Ensure the URL doesn't end with `/api/`\n- Verify your Szurubooru server is running\n\n### Modal doesn't show\n\n- Check if your settings are configured\n- Look for JavaScript errors in browser console (F12)\n- Try disabling other extensions that might conflict\n\n### CORS errors\n\n- This shouldn't happen with proper extension permissions\n- If it does, check your Szurubooru server CORS settings\n\n## Development\n\n### Testing Locally\n\n1. Make changes to the extension files\n2. Go to `chrome://extensions/`\n3. Click **\"Reload\"** button on your extension\n4. Test the changes\n\n### Adding New Features\n\nThe extension is modular:\n\n- **Context menu logic**: Edit `background.js`\n- **Upload modal**: Edit `content.js` and `modal.css`\n- **Settings page**: Edit `popup.html` and `popup.js`\n\n### Debugging\n\n- **Background script**: Check in extension's service worker console\n- **Content script**: Check in webpage's console (F12)\n- **Popup**: Right-click extension icon → \"Inspect popup\"\n\n## Compatibility\n\n- ✅ **Chrome** 88+ (Manifest V3)\n- ✅ **Edge** 88+ (Chromium-based)\n- ✅ **Brave** (Chromium-based)\n- ❌ **Firefox** (uses different extension format)\n\n## Contributing\n\n1. Fork the repository\n2. Make your changes\n3. Test thoroughly\n4. Submit pull request\n\n## License\n\nMIT License - feel free to modify and distribute.\n\n---\n\n**Made for Szurubooru users who want quick image uploads! 🚀**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascndia%2Fszuru-browser-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fascndia%2Fszuru-browser-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fascndia%2Fszuru-browser-extension/lists"}