Git Product home page Git Product logo

mpiv-userscript's Introduction

A fork of MPIV (Mouseover Popup Image Viewer).

Installation

  • on GreasyFork: link
  • directly from GitHub: script.user.js (Tampermonkey/Violentmonkey/Greasemonkey should be installed first)

Usage

Action Trigger
Activate move mouse cursor over thumbnail
Deactivate move cursor off thumbnail, or click, or zoom out fully
Prevent/freeze hold down Shift while entering/leaving thumbnail
Force-activate
(for small pics)
hold Ctrl while entering image element
 
Start zooming configurable: automatic or via right-click / Shift while popup is visible
Zoom mouse wheel / - = keys (minus or equals)
Rotate L r keys (left or right)
Flip/mirror h v keys (horizontally or vertically)
Previous/next in album mouse wheel, j k or keys
 
Download d key while popup is visible
Mute/unmute video m key while popup is visible
Open in tab t key while popup is visible
 
Configure userscript manager toolbar icon -> User Script Commands -> MPIV: configure

config UI screenshot

Technical notes

  • Ancient browsers aren't supported anymore because the code is using the modern JS syntax.

  • Most rules were updated/enhanced, some added, some dead hostings removed.

  • ShadowDOM support added for sites built with Web Components e.g. Polymer.

  • The internal status updates are not exposed by default on the <html> node because doing so slows down complex sites due to recalculation of the entire page layout. Instead only the hovered node (as reported by the matching rule) receives status updates on its mpiv-status attribute (it's not the class nor data- attribute to avoid confusing sites with unknown stuff being present in these standard places). If you were using the global status feature to customize CSS of those statuses, you'll need to enable it manually in the MPIV's config dialog.

  • Advanced "e" syntax for sites that show a small overlay when hovering thumbnails (usually transparent or semi-transparent) thus effectively hiding the thumbnails from MPIV. Now you can specify "e": {".parent": ".image"} where .parent selector should match the closest parent element that contains both the overlay and the actual image, which MPIV will find using the .image selector applied relatively to that parent element. To refer to that parent, use :scope like this: {".parent": .":scope > img:first-child"}. To specify multiple parent-image relations: "e": {".parent1": ".image1", ".parent2": ".image2"}.

  • New rule property "u" (a single string or an array of strings) that performs a very fast plain-string check. Only when it succeeds, the slow regexp "r" is checked. Special symbols may be specified in "u" property to increase the reliability of matching: ||, |, ^ - same syntax as in AdBlock filters, see the source code of the script for usage examples.

    • ||foo.bar/path, here || means "domain or subdomain" so the pattern matches domains like foo.bar or subdomain.foo.bar and doesn't match unrelated domains partially like for example foofoo.bar
    • |foo matches things that start with foo (the entire URL is checked so that means http at least, usually)
    • ^ is a URL part separator (like / or ? or :) but not a letter/number, neither any of %._-. Additionally, when used at the end like foo^ it also matches when the source ends with foo
  • New rule property "anonymous": true to make the requests for this rule anonymously (i.e. without sending cookies).

mpiv-userscript's People

Contributors

tophf avatar darkred avatar gxmobile avatar

Stargazers

Roman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.