tophf / mpiv

A fully reworked fork of Mouseover Popup Image Viewer
MIT License
167 stars 21 forks source link

Option to Exclude Videos from Ever Popping Up #94

Closed npn225 closed 2 years ago

npn225 commented 2 years ago

Would it be possible to add functionality so that videos never pop up while being hovered over?

A "Disable for Videos" button? Similar to the "Mute Videos" button.

If not, could I get the rule that would disable this userscript for all videos on all sites?

tophf commented 2 years ago

Since this is the first time I encounter such a use case, I'd say making a personal rule is the right solution. You can find which rules are activating for your videos by opening MPIV config, opening devtools console, and hovering the element in the page. The console will print the rule so you can copy its selectors into your rule in the config dialog that should also have "s":"".

npn225 commented 2 years ago

Thanks for the quick response. Once again, I want to prevent pop-ups from ever happening whenever I hover the mouse over a video.

I'm surprised that this is the first time you've ever encountered anyone asking for this.

Personally, I just don't see why I (or anyone for that matter) would want a popup for an already playing video.

It's especially annoying when you are trying to use the mouse to click on a specific place in the time/progress bar, only to have the pop-up come out of nowhere.

Overall though, this is a great userscript.

Below, at the bottom, is the rule I have come up with but it is not working.

I have set "d" to "" so that the rule works on all domains. I have also set "s" to "" so that rule says to not create a popup.

Now, how exactly do I use "e" to select for the video element tag? What I have done just below is obviously incorrect since it doesn't work.

{"name": "No popup for video tags", "d": "", "e": "*[data-mediatype='video'] > a", "s": "" }

tophf commented 2 years ago

for an already playing video

This is the bit I was missing. Normally this script shows the preview when hovering a link, so not showing just videos is unusual.

Can you share a link to some site that exhibits the problem?

tophf commented 2 years ago

Thanks. Fixed in the new version: videos will be previewed only if hovered with Ctrl being held.

npn225 commented 2 years ago

Thanks. Fixed in the new version: videos will be previewed only if hovered with Ctrl being held.

Final 2 Questions:

  1. Will this work universally or only for the site previously linked above?
  2. When will the updated new version be available for end users?

Lastly: Thank you for your quick work and dedication.

tophf commented 2 years ago
  1. It may work for all sites, but I can't be sure because players are different, sites are different, etc.
  2. Depends on their [auto]update settings.
npn225 commented 2 years ago

Alright! Thanks again!