通用圖片上傳助手

通用圖片上傳與插入:支援貼上/拖曳/選擇,批次上傳至 Imgur;自動複製 Markdown/HTML/BBCode/連結;可為各站點插入按鈕並適配 SPA;保存本地歷史。

目前為 2025-11-14 提交的版本,檢視 最新版本

作者
Pipecraft
評價
0 0 0
版本
0.3.0
建立日期
2025-10-22
更新日期
2025-11-14
尺寸
55.5 KB
授權條款
MIT
腳本執行於
所有網站

Universal Image Uploader

A user script that lets you paste, drag, or select images and batch-upload them to Imgur or Tikolu (selectable provider), 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 with progress display
  • 📋 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

Prerequisites

Install one of the following user script managers:

Install Script

  1. Click here to install the script from GitHub
  2. Click here to install the script from Greasy Fork
  3. Click here to install the script from ScriptCat

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)
  • Choose proxy via the panel’s proxy selector (default None; Imgur not supported)
  • 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

Configuration

  • Per-site upload provider: remember Imgur / Tikolu
  • Per-site proxy: remember None / wsrv.nl (Imgur not supported; when wsrv.nl is selected, outputs and history copy/open use https://wsrv.nl/?url=${encodeURIComponent(url)})
  • Per-site output format: remember Markdown / HTML / BBCode / Link
  • Per-site button injection (optional): selector, position (before | inside | after), text

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.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.
  • 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

Here are some other useful scripts that can enhance your browsing experience:

Script Description Supported Sites Install Links
Find Scripts For This Site Search Greasy Fork, OpenUserJS, ScriptCat, GitHub/Gist for scripts for the current site with one click All sites GitHub
Greasy Fork
ScriptCat
Universal Image Uploader Paste/drag/select images to upload to Imgur/Tikolu; auto-copy Markdown/HTML/BBCode/links; site button & history All sites GitHub
Greasy Fork
ScriptCat
Discourse Sort Option Quick Switcher One-click switch Discourse list sorting (created/replied time, replies, views, likes); only updates order/ascending All Discourse forums GitHub
Greasy Fork
ScriptCat
Discourse Topic Quick Switcher Cache topic list; floating panel and shortcuts to navigate fast; supports settings and multiple languages All Discourse forums GitHub
Greasy Fork
ScriptCat
LINUX.DO CloudFlare Challenge Auto Redirect Detect failed challenge and auto-redirect to the challenge page; supports manual trigger Linux.do GitHub
Greasy Fork
ScriptCat
LINUX.DO Auto Load New Topics Automatically load new topics with error handling and detection optimizations Linux.do GitHub
Greasy Fork
LINUX.DO Load More Topics Manually Add a “Load more” button at the bottom to manually control content loading Linux.do GitHub
Greasy Fork
No GIF Avatars Convert animated avatars to static PNG to reduce distraction and improve performance Linux.do, NodeLoc GitHub
Greasy Fork
V2EX No Node Specific Styles Remove node-specific styles to keep all pages unified and clean V2EX GitHub
Greasy Fork
ScriptCat
UTags Add user tags and notes to links; support filtering, import/export, auto mark-as-read; tag users or posts to identify or filter low-quality content 50+ sites including V2EX, X (Twitter), Reddit, GitHub, Bilibili, Zhihu, Linux.do, NodeLoc GitHub
Greasy Fork
ScriptCat
Links Helper Open third-party links in a new tab; parse text to hyperlinks; support custom rules, Markdown/BBCode, image-link tagging All sites GitHub
Greasy Fork
ScriptCat
V2EX.REP Fix floor number offsets, show hot replies, prefetch pages and image uploads; auto check-in, quick thank/hide, double-tap navigation V2EX GitHub
Greasy Fork
ScriptCat
Replace Ugly Avatars Bulk replace user avatars using DiceBear-generated random avatars; support unified style V2EX, Linux.do GitHub
Greasy Fork
ScriptCat

License

MIT License - see the LICENSE file for details.

Related Links