Universal Image Uploader

Paste/drag/select images, batch upload to Imgur/Tikolu/MJJ.Today/Appinn/StarDots; auto-copy Markdown/HTML/BBCode/link; site button integration with SPA observer; local history.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

作者のサイトでサポートを受ける。または、このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
作者
Pipecraft
1日のインストール数
0
累計インストール数
54
評価
1 0 0
バージョン
0.14.0
作成日
2025/10/22
更新日
2026/02/26
大きさ
144KB
ライセンス
MIT
対象サイト
すべてのサイト

Universal Image Uploader

A user script that lets you paste, drag, or select images and batch-upload them to Imgur or Tikolu or MJJ.Today or Appinn (selectable provider), optionally converting to WebP, then auto-copy the result in Markdown/HTML/BBCode/plain link. It also integrates configurable site buttons (works with SPA pages) and keeps a local upload history for quick reuse.

中文版

screencapture

screencapture

screencapture

screencapture

screencapture

screencapture

Features (MVP)

  • 📥 Paste, drag-and-drop, or file picker to collect images
  • 📤 Batch upload to Imgur/Tikolu/MJJ.Today/ImgBB/Appinn/Photo.Lily/111666.best/Skyimg/StarDots with progress display
  • 🔄 Support concurrent upload to a secondary backup host (Dual-upload)
  • 🖼️ Optional WebP conversion via proxy or supported hosts
  • 📋 Auto-copy output in Markdown / HTML / BBCode / Link
  • 🕘 Local history to quickly re-copy and reuse uploads
  • 🔘 Optional site button injection with SPA observer (per-site settings)

Installation

Usage

  • Open any site, paste or drop images onto the page, or use the panel’s file picker
  • Watch the upload queue and progress
  • Choose upload provider via the panel’s host selector (Imgur/Tikolu/MJJ.Today/ImgBB/Appinn/Photo.Lily/111666.best/Skyimg/StarDots)
  • (Optional) Choose a secondary host for dual-upload and automatic fallback
  • Choose proxy via the panel’s proxy selector (default None)
  • Toggle WebP option to convert images via proxy
  • When finished, the script auto-copies based on your selected format
  • Use history to quickly copy past uploads

Output Formats

  • Markdown: ![alt](url)
  • HTML: <img src="url" alt="alt" />
  • BBCode: [img]url[/img]
  • Link: url

Site Button Settings

  • Open the panel and switch to "Settings".
  • Enter a CSS selector for the target element (e.g., .comment-screenshot-control).
  • Choose position: Before inserts before, After inserts after, Inside appends as the last child.
  • Set button content: plain text or a single-root HTML snippet. Leaving it empty uses the localized default.
  • Click Save & Insert to persist the rule locally and inject immediately. A DOM observer keeps it inserted on SPA pages.
  • Use Remove button (temporary) to clear injected buttons without deleting rules.
  • Use Clear settings to remove all saved rules.
  • Each rule in the list supports Edit and Delete.
  • Tips: prefer stable, unique selectors to avoid multiple insertions.

Roadmap (Planned / Not Yet Implemented)

  • 🌐 Multi-provider uploads: SM.MS, Cloudflare Images, self-hosted S3/MinIO
  • 🛠 Image processing options: quality, resize, compression, format (JPEG/PNG/WebP), EXIF removal
  • 📦 Queue controls: concurrency slider, retry/backoff, cancel/pause
  • 🧩 Template system: fully customizable output formats and HTML snippets
  • 🗂 History enhancements: filters by time/provider/tags, batch copy, faster reuse

Changelog

v0.14.x

  • New provider: Added StarDots image hosting support. Requires configuration of API Key, Secret, and Bucket name in the settings panel.
  • Fix: Refactored StarDots settings UI to use c function instead of innerHTML for better compatibility with CSP-restricted sites.

v0.13.x

  • Fix: Optimized site button detection logic to prevent duplicate insertions when the page DOM changes (e.g., dynamic toolbar updates).
  • Multi-host support:
    • Added ability to upload to a secondary host concurrently.
    • Implemented proxy chain fallback: uses primary host by default, falls back to secondary host if primary fails or via proxy chain.
    • Updated proxy chain strategy: Primary(Proxy) -> Secondary(Proxy) -> Primary(Direct).
    • UI Improvements: Distinct color themes for primary (blue) and secondary (purple) host controls and tags.

v0.12.x

  • Enhanced wsrv.nl proxy: appends &output=webp when WebP option is enabled.

v0.11.x

  • Added new upload providers: ImgBB, Photo.Lily, 111666.best, and Skyimg.
  • Updated documentation and host selector to include the new providers.
  • Aligned 111666.best proxy behavior with Imgur (supports wsrv.nl -> DuckDuckGo).
  • Improved history panel: larger thumbnails, lazy-loaded previews, and a floating enlarged preview when hovering thumbnails.
  • Optimized log list style: improved spacing, added background/border for better visibility, and hover highlight effects.
  • Added Skyimg (WebP) variant that uploads with ?webp=true.
  • Enhanced wsrv.nl proxy: for GIF files (based on original filename) append &n=-1.

v0.10.x

  • Feature: Comprehensive iframe support.
    • The upload panel is displayed only in the top frame.
    • Site buttons are injected into all frames (including iframes).
    • DOM changes in iframes are monitored for button injection.
  • Fix: Cross-frame focus tracking.
    • Correctly handles file picker requests and image pasting from iframes.
    • "Copy" button correctly targets the last focused element, even inside iframes.
  • Optimization: Refactored drag-and-drop logic.
    • Unified drag-and-drop initialization for both main frame and iframes, reducing code duplication.
    • Drag-and-drop settings changes now sync instantly across frames via addValueChangeListener.
  • Optimization: Unified paste upload behavior across frames.
    • Paste events in both the main frame and iframes now use the same iu:uploadFiles pipeline as drag-and-drop, so behavior is consistent regardless of where you paste.
  • Feature: Mock upload host for testing.
    • Optional test host that simulates a 1-second delay and returns a random demo image URL.
    • Controlled via an internal flag and disabled by default for normal users.
  • Fix: Drag overlay flicker over inputs.
    • The drop overlay is now pointer-events: none and only toggles visibility on valid drag targets, avoiding oscillation when dragging across input fields.

v0.9.x

  • Added new proxy options: DuckDuckGo and wsrv.nl -> DuckDuckGo.
  • Enabled proxy selection for Imgur (supports DuckDuckGo and wsrv.nl -> DuckDuckGo; wsrv.nl automatically switches to wsrv.nl -> DuckDuckGo).
  • Refactored proxy configuration logic for better extensibility.

v0.8.x

  • Add simulated addValueChangeListener support for script managers that do not implement it natively, enabling cross-tab data synchronization.
  • Optimization: Add polling mechanism as a fallback for data synchronization when native listeners are unavailable.
  • Refactoring: Migrate all synchronous GM_ storage calls to asynchronous APIs to improve script performance and compatibility with modern environments.

v0.7.x

  • Fix compatibility issues with utags-shortcuts
  • Refactoring: use esbuild to bundle the script

v0.6.x

  • Per-site enable toggle via command menu; refresh page to apply.
  • Per-site paste and drag-and-drop toggles in Settings; preset sites default to enabled.
  • Support pasting multiple images at once.
  • Paste/drag toggles take effect immediately without page reload.
  • Insert upload-status placeholders into the target input and replace on success/failure.

v0.5.x

  • Add MJJ.Today upload provider.
  • Add Appinn upload provider.

v0.4.x

  • Support custom format templates.
  • Switch Imgur upload from fetch to GM_xmlhttpRequest to avoid CORS.
  • Extract shared gmRequest helper to unify upload provider requests.

v0.3.x

  • Settings storage migrated to a unified per-site map, consolidating previously separate keys into a single structure. Example shape: { format?, host?, proxy?, btns?: [...] }.
  • Panel UI is now rendered inside a Shadow DOM for style isolation from host sites. Internal styles use :host; the drop overlay (#uiu-drop) and site-injected buttons (.uiu-insert-btn) remain in the page DOM.
  • Added clear “open” visuals and accessibility states (aria-pressed) for History and Settings toggles.
  • Shadow-DOM-aware focus tracking: resolves editable targets inside nested open shadow roots and same-origin iframes; excludes the script’s panel from being tracked as a target.
  • Trusted Types compliance: avoid innerHTML clears (use textContent = ''), and parse custom button HTML via Range.createContextualFragment to prevent TT violations on strict sites.
  • Backward compatibility: existing settings are migrated automatically; no manual action required.

v0.2.x

  • Added proxy option: None / wsrv.nl; Imgur not supported; when wsrv.nl is selected, outputs and history copy/open use https://wsrv.nl/?url=${encodeURIComponent(url)}
  • Added Tikolu upload provider; choose Imgur/Tikolu via panel host selector
  • Added last-focused input tracking: when clicks cause focus loss (e.g., upload), insert into the last visited input and restore focus; improved caret fallback for contentEditable elements

v0.1.0

  • Initial MVP: Imgur upload, batch & progress, auto-copy (Markdown/HTML/BBCode/Link), local history, SPA-aware button injection

More Useful Scripts

🏷️ UTags - Add User Tags to Links

  • Link: Greasy Fork · ScriptCat · GitHub
  • Features: Add custom tags and notes to user, post, video and other links
  • Highlights: Support special tag filtering (like spam, block, clickbait, etc.), data export/import, auto-mark viewed posts
  • Supported Sites: V2EX, X(Twitter), Reddit, GitHub, Bilibili, Zhihu, Linux.do, Youtube and 50+ websites
  • Description: Super useful tag management tool for adding tags to forum users or posts, making it easy to identify or block low-quality content

🧰 UTags Advanced Filter

  • Link: Greasy Fork · ScriptCat · GitHub
  • Features: Real-time filtering and hiding of scripts on GreasyFork
  • Highlights: Available as both a userscript and a browser extension
  • Supported Sites: Greasy Fork
  • Description: A tool that supports real-time filtering and hiding on GreasyFork, available in userscript and browser extension versions

⚡ UTags Shortcuts

  • Link: Greasy Fork · ScriptCat · GitHub
  • Features: Per-site grouping, icon support, floating or sidebar navigation panel
  • Highlights: Floating/Sidebar modes, URL/JS script support, visual editor, keyboard shortcuts
  • Supported Sites: All websites
  • Description: A powerful userscript that streamlines your browsing workflow with a customizable navigation panel for quick access to favorite links and scripts

🔗 Links Helper

  • Link: Greasy Fork · ScriptCat · GitHub
  • Features: Open third-party website links in new tabs, parse text links into hyperlinks
  • Highlights: Support custom rules, parse Markdown and BBCode formats, convert image links to image tags
  • Supported Sites: Universal for all websites, including Google, YouTube, GitHub, V2EX, etc.
  • Description: Enhance link browsing experience, automatically process various link formats for more convenient web browsing

🔍 Find Scripts For This Site

  • Link: Greasy Fork · ScriptCat · GitHub
  • Features: Quickly find scripts for the current site across multiple repositories
  • Highlights: Settings dialog, real-time sync, smart domain extraction
  • Supported Sites: All websites
  • Description: A user script to quickly find scripts for the current site across multiple repositories, now with a settings dialog and real-time sync across tabs

License

MIT License - see the LICENSE file for details.

Related Links