UserScripts

🏞️ Picviewer CE+

twitter Discord reddit stars

Zoom images across all your favorite websites. Pop up, scale, edit, rotate, batch save images, or automatically load pictures from subsequent pages. Simply hover your mouse over any image and click the icons on the float bar.

Recommended similar plugins: Imagus - Hover-zoom+ - Mouseover Popup Image Viewer

Quick Start

Install from Github📥 or Greasefork📥.

Hover your mouse over any image and click the icons on the float bar.

Press CTRL + G to quickly enter the gallery. Hold CTRL to view a larger picture when hovering over images or links.

There are additional settings available in the “Picviewer CE+ config” for further customization. Currently, reviewing these settings is the best way to learn about the script’s capabilities. Try exploring more functions on your own!

Contribution & Support

If you are glad to assist with the translation, please ✍️edit this file. It will be beneficial for individuals who speak the same language as you do. Thank you for your help.

Need more rules for peculiar sites? feel free to pull requests or open issues.

PDF Addon

Picviewer CE+ PDF Addon. After installing this addon, when the Compress to ZIP feature is enabled, a PDF file will be generated instead of a ZIP file during the packaging process.

Make a PDF e-book with this addon

For example, if there is a website with images from xxx.com/1.jpg to xxx.com/99.jpg, you can use this addon to generate a beautiful PDF e-book as follows:

  1. Open the gallery by pressing Ctrl + g
  2. In the Command menu, find and click Add image
  3. Input xxx.com/[1-99].jpg
  4. Right-click in the thumbnail frame below to ignore any unwanted images
  5. Click Download all shown in the Command menu

This way, you'll get a beautifully created PDF e-book.

Custom Rules Example:

💝 Buy me a coffee with Ko-fi or 愛發電 to keep my scripts always up to date.

{
    "name": "Dmm",
    "src": "pics\\.dmm\\.co\\.jp",
    "r": "ps.jpg",
    "s": "pl.jpg"
}
{
   "name": "Example",
   "url": "^https://xxx\\.com/",
   "r": "/us\\.xxx\\.com/\\d+wm//i",
   "s": "previews.xxx.com/images/"
}
{
    "name": "Asiansister",
    "clickToOpen": {
        "enabled": true,
        "preventDefault": true,
        "type": "actual",
        "button": 0,
        "alt": false,
        "ctrl": false,
        "shift": false,
        "meta": false
    }
}

You have the option to use a standalone userscript, which allows you to manage all of your custom rules effectively.

Feel free to share your own custom rules on Greasy Fork!

// ==UserScript==
// @name         Picviewer CE+ custom rules
// @namespace    hoothin
// @version      0.1
// @description  Picviewer CE+ custom rules
// @author       You
// @match        *://*/*
// @run-at       document-start
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    window.pvcepRules = (window.pvcepRules || []).concat([
         //Delete these two example rules and add your own.
         {
             name: "rule1",
             src: /pics\.dmm\.co\.jp/i,
             r: "ps.jpg",
             s: "pl.jpg"
         },
         {
             name: "rule2",
             url: /^https:\/\/xxx\.com\//,
             r: /us\.xxx\.com\/\d+wm\//i,
             s: "previews.xxx.com/images/"
         }
    ]);
})();
Advance rule wizard

There are two types of rules available:

Custom download filenames

In settings, Image file naming chooses between the original filename (from the image URL), the image description (usually title/alt), or both. Prefix filenames with the page title adds the page title.

A site rule can override both settings with saveName. Use a template for a fixed artist name:

{
    "name": "My artist",
    "url": "^https://example\\.com/",
    "saveName": "my-artist-{filename}"
}

Templates accept {url}, {pageUrl}, {linkUrl}, {title}, {filename} and {description}. For example, my-artist-{filename} saves photo.jpg as my-artist-photo.jpg.

For URL extraction, add a synchronous function to a JavaScript rule in the standalone custom-rule userscript shown above (functions cannot be written in JSON):

{
    name: "Artist from URL",
    url: /^https:\/\/example\.com\//,
    saveName: ({ linkUrl, pageUrl, filename }) => {
        const artist = new URL(linkUrl || pageUrl).pathname.match(/\/users\/([^/]+)/);
        return artist ? artist[1] + "-" + filename : "";
    }
}

For a query parameter such as ?user_id=12345, replace the function with:

saveName: ({ pageUrl, filename }) => {
    const uid = new URL(pageUrl).searchParams.get("user_id");
    return uid ? uid + "-" + filename : "";
}
Field Value passed to the function
url Image URL being downloaded
pageUrl Page URL recorded when the image was collected
linkUrl Link surrounding the original image, or an empty string
img Original image element, or null if unavailable
title Source page title
filename Original filename without extension; defaults to image
description Image description from the rule or title/alt

Specify url for a site naming rule, or reuse an existing rule’s name to inherit its URL match. Invalid filename characters are removed and the image extension is added automatically. Empty results, invalid return values and errors fall back to the global settings. Batch downloads add a sequence number to prevent duplicate names in ZIP files.

URL extraction only uses the provided URLs; it makes no extra requests. For sites such as X, a numeric UID can only be extracted if it is already present in one of those URLs. Use a fixed custom prefix otherwise.

https://hoothin.github.io/UserScripts/Picviewer%20CE+/gallery.html

A blank gallery page designed for viewing local or online pictures, showcasing every image you have imported.

You can drag and drop folders or videos/audios/images into this gallery to get an electronic slideshow to view them.

Click with Ctrl key can import folder too.

Include mode=1 to open gallery in view-more mode.
Add imgs=http://xxx/xxx.jpg to import images. ` ` to split multi-image, [01-09] to generate nine urls form 01 to 09
For example:

https://hoothin.github.io/UserScripts/Picviewer%20CE+/gallery.html?mode=0&imgs=http://xxx/xxx[01-99].jpg
or
https://hoothin.github.io/UserScripts/Picviewer%20CE+/gallery.html?mode=0&imgs=${encodeURIComponent(IMG1 + ' ' + IMG2)}

Thousands compatible sites for find larger or original images like

deviantart.com google.com wikipedia.org dribbble.com bing.com imdb.com github.com tumblr.com youtube.com pixiv.net steampowered.com itunes.apple.com pinterest.com gelbooru.com discordapp.com twitter.com fandom.com reddit.com yande.re wallhaven.cc 500px nyaa e621.net nhentai.net tieba.baidu.com douban.com weibo.com bilibili.com t.qq.com huaban.com hujiang.com dianping.com trakt.tv music.163.com rule34hentai.net photosight.ru boqingguan.com 178.com zhisheji.com themex.net operachina.com topit.me bcy.net zhihu.com autohome.com.cn bitauto.com xcar.com.cn pcauto.com.cn auto.sina.com.cn baike.baidu.com nvshens.com 24meitu.com acgget.com lofter.com sohu.com taobao.com alibaba.com yihaodian.com addons.mozilla.org crsky.com firefox.net.cn jd.com dangdang.com detail.zol.com.cn duokan.com youku.com yyets.com xiaohongshu.com moegirl.org fanfou.com meipai.com game.yesky.com dota2.sgamer.com mafengwo.cn 588ku.com ibaotu.com 58pic.com

And so on …