Topic: [Plugin] umami : e621 Browser Extension | 2024/11/22

Posted under e621 Tools and Applications

umami

An e621 browser extension.

[2024/11/22] 2.3.2 Out now with fix for infinite scrolling

This is available on firefox, and pending review on chrome store

Old Updates

[2024/11/22] 2.3.1 Out now with fix for e621 changes

updated the css value for tumbnails

This is available on firefox, and pending review on chrome store (may be rejected, who knows, it's still manifest v2) (looks like it worked)

Oops... looks like infinite scrolling is still broken... fixing

[2022/04/24] 2.3.0 Out now with fix for blacklist

updated the blacklist css value as sleith found

2.2.1 Out now with updates for new website layout

Also with improved downloading (faster)

2.0 Out now, With pool downloading

  • Slideshow
    • Adjustable time
    • Autoplay and wait for video (not for flash ones)
    • Loop video (not for flash ones)
    • Automute video (not for flash ones)
  • Infinite scrolling
  • Arrowkey navigation
    • Works in the overlay and in pools
  • Saved Config
  • Key Rebinding
  • Better downloading
  • Pool downloading
Instructions

To use, install, then click a thumbnail in posts or a pool, to open the overlay.

  • Clicking thumbnails will open the slideshow view
  • Pools and Post Index should load more content as you get to the bottom

Store Links :

Firefox version
Chrome version

Unpacked Links:

These no longer work as host went down.
These are intended for use on browsers that don't support addon stores, they do not come with an update feature built in, i will look into that in the future

"Firefox version"
"Chrome version"

Any requests? Bug reports?

Source :
Available at request, (or just open up the plugin, it's just javascript), I haven't put it up anywhere as its kind of a mess of stuff i slowly put together without much care, maybe if i refine it, I'll get it up on github.

Updated

This extension is fantastic! The slideshow view looks good and having the option to quickly download and/or share the link to the page is incredibly useful.

The only issue is that after the next page of search results gets appended onto the first page, a user's blacklist is no longer applied to those new items and there's no way to filter them out using the blacklisted class. Makes slideshow user a bit of a minefield!

Since blacklisting/hiding content in /post pages happens client-side on page load, I can't really figure out a good way to fix this.

Updated by anonymous

Something that might be neat would be to have webms loop, or have a checkbox like the autostart one.

Updated by anonymous

sleith said:
The only issue is that after the next page of search results gets appended onto the first page, a user's blacklist is no longer applied to those new items and there's no way to filter them out using the blacklisted class. Makes slideshow user a bit of a minefield!

Hi,

yeh i got round to fixing this today, apologies for the delay

Updated by anonymous

alokikola said:
Something that might be neat would be to have webms loop, or have a checkbox like the autostart one.

I will look into this

Updated by anonymous

Hi there! I use your extension with Chrome Canary v79, and it seems to have suddenly stopped working. Image overlays don't load. When it tries to load an image, it prints this to the console:

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://e621.net/post/show/910323 with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.

I'm guessing this is due to a change in Chrome's policies for cross-origin requests, which are documented here:
https://www.chromium.org/Home/chromium-security/extension-content-script-fetches

Is there anything you can do in the short-term to fix this?

Updated by anonymous

anonymousanalogue said:
Hi there! I use your extension with Chrome Canary v79, and it seems to have suddenly stopped working. Image overlays don't load. When it tries to load an image, it prints this to the console:

Cross-Origin Read Blocking (CORB) blocked cross-origin response https://e621.net/post/show/910323 with MIME type text/html. See https://www.chromestatus.com/feature/5629709824032768 for more details.

I'm guessing this is due to a change in Chrome's policies for cross-origin requests, which are documented here:
https://www.chromium.org/Home/chromium-security/extension-content-script-fetches

Hmm, were you using e926.net?

Because it really shouldn't be a cross origin request, the scripts only run on e621.net and e926.net, so...

Ok chrome now treats content scripts as running in the chrome extension domain for xhr requests.... great, i will look into moving the request into the background script.

anonymousanalogue said:
Is there anything you can do in the short-term to fix this?

In short maybe, and I'm on it. :D

I'm doing a fairly major re-write of it at the moment, do you have telegram or so? I'll send you a pm and we can see about figuring it out / giving you a test version.

On another note I need testers, so PM me with your telegram handle if you want to test.

Updated by anonymous

2.0 Is out now

On firefox, it's uploaded to chrome store but pending review

anonymousanalogue said:
Is there anything you can do in the short-term to fix this?

Done, it should now work in the current chrome canary too once approved on the store

Updated by anonymous

Would you happen to have just the .crx file? I'm using Ungoogled Chromium and unfortunately can't install extensions from the Chrome Store directly.

Updated by anonymous

HarryBenson said:
Would you happen to have just the .crx file? I'm using Ungoogled Chromium and unfortunately can't install extensions from the Chrome Store directly.

I have pm'd you a test link, if it works I'll add it to the op

The crx won't load because it's unauthorized or some other bs, so I have added links to zip files in the op, you can add them using developer modes in firefox and chrome (will need to unzip for chrome)

I will look into packaging them up properly in the future

Updated by anonymous

Is there a reference for the filename patterns?
edit: Nevermind I found the ? tooltips next to the options

Updated by anonymous

perspectracoon said:
Hi there, really awesome extension you've made. I just bought an external monitor that I intend to use in portrait, and I've noticed that the slideshow view tends to truncate the right side of an image if it is wide enough. I can send you a video of what I mean if you'd like.

(I'm running Firefox v71 by the way)

Sure, I'll IM you and can send me the vid.

Updated by anonymous

I'm having an annoying issue where the update notice screen pops up every time I open the site in a new tab in private browsing mode. (I'm on Firefox, haven't tested other browsers.)

It doesn't matter how many times I've closed the notice during the session, it keeps popping up as if it was the first time I'm visiting. I've even opened the site on regular browsing mode (where the notice only popped up once) in the hopes that Firefox will remember it in private browsing to no avail.

Any idea what might be the problem? Any chance that there could be an option to disable the notice screen?

Updated by anonymous

taliont said:
I'm having an annoying issue where the update notice screen pops up every time I open the site in a new tab in private browsing mode. (I'm on Firefox, haven't tested other browsers.)

It doesn't matter how many times I've closed the notice during the session, it keeps popping up as if it was the first time I'm visiting. I've even opened the site on regular browsing mode (where the notice only popped up once) in the hopes that Firefox will remember it in private browsing to no avail.

Any idea what might be the problem? Any chance that there could be an option to disable the notice screen?

Apologies, I will look into that with the current update.

Hopefully ready in the next day or two.

A few issues with 2.1:

On Firefox I'm getting the warning Loading failed for the <script> with source “moz-extension://904ba7cc-db87-42cc-988f-c55f0b7bf4b3/pagejs/page.js”. in the console. I'm guessing that pagejs/page.js was moved to js/page.js.

The voteUp, voteDown, favorite, and download key bindings don't work.

Key bindings can't be configured (it just gets stuck waiting for an option)

Otherwise good job on the update.

attackhelicopter said:
A few issues with 2.1:

On Firefox I'm getting the warning Loading failed for the <script> with source “moz-extension://904ba7cc-db87-42cc-988f-c55f0b7bf4b3/pagejs/page.js”. in the console. I'm guessing that pagejs/page.js was moved to js/page.js.

The voteUp, voteDown, favorite, and download key bindings don't work.

Key bindings can't be configured (it just gets stuck waiting for an option)

Otherwise good job on the update.

Thanks, I'm already fixing some of the items you mentioned.

On a side note for others, the update is now live for firefox and chrome. (google were being a bitch about it too, complaining that I need to provide more pictures of the plugin.... when the 2 that I've had on there for the past 2 years have been fine....)

I like this extension very much, thank you for your hard work! But I can't seem to get it working on a "WaterFox Current" (a fork from Firefox).
Do you support other browser forks or you just stick to mainline Firefox only?
Thanks in advance.

rl-1004 said:
I like this extension very much, thank you for your hard work! But I can't seem to get it working on a "WaterFox Current" (a fork from Firefox).
Do you support other browser forks or you just stick to mainline Firefox only?
Thanks in advance.

Can you install addons from the mozzila addon site? If not then you might need to use the version I host seperatley, which reminds me I need to update them.

Firefox version
Chrome version

Edit:

Ok so seems that you can install normally, but for some reason it doesn't load correctly, i will look into it.

Bug found, fix uploaded to addon site, please make sure to update.

Updated

Your 'overlay reference sheet' seems to be borked, it links to i.imgur.com (exactly, ie. not to any actual image)

savageorange said:
Your 'overlay reference sheet' seems to be borked, it links to i.imgur.com (exactly, ie. not to any actual image)

Huh....

Ok, well it needed updating anyway, so I'll go ahead and do that.

Updated

Download functionality on Firefox doesn't seem to work; neither the button on the slideshow nor the hotkeys on individual posts. It looks like it's getting the hotkey input, as ctrl-s, the default will not open the full page save dialogue as it would without umami. The other hotkeys work fine.
Edit: This seems to happen if you ask umami to save without any arguments in the config for individual posts. Doesn't like saving them as just the md5.

I just started using this extension, but I noticed that if I don't want to use slideshow mode, when I left click an image it forcefully opens the post in a new tab. Is there a way to disable the new tab open on click ?

does the slideshow act randomly for anyone else

it'll just arbitrarily start autoplaying at some point in browsing and either never stop or stop when you do some completely random thing like messing with a random option or expanding a collapsed option group with no rhyme or reason and even quitting and relaunching slideshow mode doesn't stop it, and a fresh install has no impact

insanely annoying mostly because it makes no sense at all

gaslighting-ass issue to have lol

crackpotminemarket said:
Ever since the global blacklist change I've had a problem where images that are blocked by this global blacklist cannot be viewed by the overlay slideshow (the one that opens when you left click an image in a pool). All it does is say "You must be logged in to view this image. (learn more)", which is what appears when you open such images on this website while not logged in. I, however, always log in (every time, since this is Tor Browser, AKA Firefox 68). Allowing scripts from e621.net changes absolutely nothing. I think this might be a flaw in how this extension loads images, related to people above saying that their own blacklists do not apply to slideshow. Sorry, you can't get away with loading images anonymously anymore, global blacklist cut off like a quarter of this entire website now.

I'm having this same problem still

I don't know if this well help anyone else, but I've found that on firefox if you log into e6 on a non-private instance and set it to remember you as logged in the slideshow view will use your blacklist when you're using private browsing. The only issue I've found with this workaround for me at least is that positive scores will be doubled in the slideshow view, but otherwise it works fine.

Has anyone else been having issues with playing videos? I can't play videos unless I disable Umami and restart my browser. This includes both in the slideshow and on the standard e621 page.

thebassist said:
Has anyone else been having issues with playing videos? I can't play videos unless I disable Umami and restart my browser. This includes both in the slideshow and on the standard e621 page.

I have been experiencing this. Even with the direct link to the webm, the video either loads incredibly slowly or (more often) not at all.
Other browsers on the same machine are not affected and disabling the extension makes the problem go away.

No idea if anything has changed server-side or what but now (global and personal) blacklisted items are being shown in slideshow mode. D:

There has been a change how the blacklist works. In order for videos to be correctly hidden it uses a different css approach to hide posts.

Here's where the changes were made. The main problem is probably that a few css classes were removed/renamed.

Thanks for the heads up! It does seem that the recent changes to blacklist classes has caused this.

Inside the extension, within the main script (bundle.1.js) on line 2570, it has the blacklist css tag as

const cssBlacklisted = ".blacklisted-active";

it seems that e621 now uses ".blacklisted". So it should be a quick fix. Sadly I can't do it since firefox needs a huge extension buildsystem installed and signed builds just to make something that can be installed.

For anyone that might still want to use this add-on, I threw together a very simple userscript that adds the old blacklist class that umami looks for to any gallery item with the new blacklist tag. I've been using it for a while now with no issue.

Just make a new script in greasemonkey/tampermonkey and paste this in then reload any e621 tabs you have open. It runs after the page loads completely so don't slam open a gallery the moment elements appear on the screen if you have a large number of items per page set.

// ==UserScript==
// @name         Patch Blacklisted Items
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Adds the old blacklisted class to blacklisted items so they can be hidden properly.
// @author       Sleith
// @match        https://e621.net/*
// @icon         https://e621.net/favicon.ico
// @grant        none
// @run-at     document-idle
// ==/UserScript==

(function() {
    'use strict';

    const elements = [...document.querySelectorAll('.blacklisted')];
    elements.forEach(e => e.classList.add('blacklisted-active'));

})();

wolfgang_senizen said:
Can you install addons from the mozzila addon site? If not then you might need to use the version I host seperatley, which reminds me I need to update them.

Firefox version
Chrome version

Edit:

Ok so seems that you can install normally, but for some reason it doesn't load correctly, i will look into it.

Bug found, fix uploaded to addon site, please make sure to update.

These no longer work, and the main page seems to be some toy terminal game, which after exploring for a while doesn't seem to have a way to get the file from. We're gonna need new links for that.

On an (as far as I can tell) unrelated note:
I'm trying to run this using Vieb, a browser which uses electron, and it successfully installs the firefox version but images won't display. This may be an issue with Vieb itself but perhaps you could look into it? Everything else with the plugin seems to work fine, it's just the image display that isn't working.

Updated

I have updated the extension to fix the blacklist on firefox.

It faces more of a challenge for chrome due to manifest change requirements, I have submitted it, but its pending a review. Chrome is now live too

I avoided posting the src before because it was an awful mess that I hacked together one day then expanded and expanded and never actually redid to any standard. But I feel it may be time to offer others a chance to apply fixes.

kateyagi said:
On an (as far as I can tell) unrelated note:
I'm trying to run this using Vieb, a browser which uses electron, and it successfully installs the firefox version but images won't display. This may be an issue with Vieb itself but perhaps you could look into it? Everything else with the plugin seems to work fine, it's just the image display that isn't working.

As to this, I can't guess what's there, but electron is chromium based, so it might be already restricting the background scripts from working as they used to due to the manifest changes chrome is starting to require. (Or i could be talking out my arse, it's a guess)

Updated

wolfgang_senizen said:

umami

An e621 browser extension.

[2022/04/24] 2.3.0 Out now with fix for blacklist

updated the blacklist css value as sleith found

Old Updates

2.2.1 Out now with updates for new website layout

Also with improved downloading (faster)

2.0 Out now, With pool downloading

  • Slideshow
    • Adjustable time
    • Autoplay and wait for video (not for flash ones)
    • Loop video (not for flash ones)
    • Automute video (not for flash ones)
  • Infinite scrolling
  • Arrowkey navigation
    • Works in the overlay and in pools
  • Saved Config
  • Key Rebinding
  • Better downloading
  • Pool downloading

I need testers, so pm me your telegram handle if you're interested

Instructions

To use, install, then click a thumbnail in posts or a pool, to open the overlay.

  • Clicking thumbnails will open the slideshow view
  • Pools and Post Index should load more content as you get to the bottom

Store Links :

Firefox version
Chrome version

Unpacked Links:

These no longer work as host went down.
These are intended for use on browsers that don't support addon stores, they do not come with an update feature built in, i will look into that in the future

"Firefox version"
"Chrome version"

Any requests? Bug reports?

Source :
Available at request, (or just open up the plugin, it's just javascript), I haven't put it up anywhere as its kind of a mess of stuff i slowly put together without much care, maybe if i refine it, I'll get it up on github.

interesting, ill have to install this later when i get the chance

This is definetely a great extension providing a very good amount of improvements,but if i had to report a problem i'd have to say the upvote counter value is being shown 2 times, and fixes itself only when interacting with it by upvoting or downvoting

giannipapetti said:
This is definetely a great extension providing a very good amount of improvements,but if i had to report a problem i'd have to say the upvote counter value is being shown 2 times, and fixes itself only when interacting with it by upvoting or downvoting

Hmm, I will look into this.

Probably something that broke in the major site update a year or so ago and I just don't use enough to notice.

I hate to bother you with a request, but would it be possible to add the e621 thumbnail enhancer script to Umami as an optional feature? I like to use Umami in tandem with enhanced thumbnails, but it's not currently compatible with the infinite scroll feature, and newly loaded images are in a lower resolution. I was wondering if you could bring the two together and make it so that we can infinitely scroll through high resolution thumbnails?

Thumbnail enhancer for reference:
https://sleazyfork.org/en/scripts/397449-e621-thumbnail-enhancer-2

frozenwaffelz said:
... possible to add the e621 thumbnail enhancer script to Umami...

I will look into this, I have time to work on it atm, and will probably need to remake it for the upcoming chrome changes.

So adding now would probably be a good time for adding things

This plugin is hit or miss now

I use it on Firefox and Chrome and the webm's take absolutely forever to start autoplaying
Meanwhile, I can just right click the video and open it in a new tab and it plays immediately.

Slideshow stopped working for me too, coincidentally at the exact same time as my e621 subscriptions extension also stopped working

I tried switching from chrome to firefox, thinking Chrome's new extension policy was the issue, but it didn't fix it.

Glad I'm not the only one who uses this thing. It broke yesterday for me too. I might be the whole "Migrate to Manifest V3" thing or it could be an e621 update. I tried unpacking the extension and converting it to V3 myself but I get stuck at "The message port closed before a response was received." It would load properly but would never show the red boxes to select.

If its an update that broke things, this commit might be what caused it. It got pushed to the release build 2 days ago so its roughly the same time.
I just used a chrome extension CRX Extractor/Downloader to get the whole unpacked extension if anyone else wants to take a shot at fixing it.

This is the only slideshow extension/userscript that actually does what I want for pc so I hope the guy that made it will either fix it or post it on GitHub so anyone can start making forks to fix it.

Figured it out. Turns out it had nothing to do with Manifest V3 (yet) and it was the e621 update that broke it. So I made a quick fix for it.
Code and instructions to use the fixed extension can be found at https://github.com/Temmie-Flakes/umami_extension/releases/tag/v1.0

No clue if it works for Firefox. let me know.
More info can be found on the repo readme.
If anyone wants to help port it to Manifest V3, I made a fork with a somewhat working port (pool downloads don't work)

I was only able to get the firefox version working locally using the developer browser so it would accept a non-verified extension to run.

XPI files are literally just zip files. The addon can be extracted and you can change lines 2569 and 3640 of js/bundle1.js from article.post-preview to article.thumbnail and it will fix the issue reapersans2 found. I was able to re-pack it with web-ext and use the Developer browser. I do not have an account to publish the change and I don't feel comfortable sharing files. Here's a general set of steps if you want to try this yourself. This is MIT Licensed, so you could republish it with proper credit if you were so inclined:

NOTE: You MUST use Firefox Developer, Nightly, or Enterprise to do this with an unverified extension. https://www.mozilla.org/en-US/firefox/developer/
1. Download the xpi from https://addons.mozilla.org/en-US/firefox/addon/umami/ by right-clicking "Add to Firefox" and clicking "Save As"
2. Unzip the xpi file. You can change the extension to .zip if needed.
3. Change lines 2569 and 3640 of js/bundle1.js from article.post-preview to article.thumbnail.
4. Delete the META-INF directory. This is used for signing and need to be removed.
5. Re-pack the extension using web-ext. This will generate a zip file in web-ext-artifacts that will be used to install the extension. Instructions here: https://extensionworkshop.com/documentation/develop/getting-started-with-web-ext/
6. Disable xpi signature checking by going to about:config and setting xpinstall.signatures.required to false
7. Go to manage your extensions and click the gear icon on the top right of it, select Install Add-on From File..., and select the web-ext output zip file. Firefox will warn you that it's unsafe, but should let you install it and use it.

Thank you lolwut123 for the help with the Firefox stuff. I'm not a web developer so I barely know what I'm doing. Plus I don't use Firefox so I know nothing of how its extensions work.

I compared the data between the Firefox version and the chrome version and the only difference is a slight change to the manifest.json and turns out chrome will just work with the Firefox manifest. Looks like Wolfgang took care to make the JavaScript work for both chrome and Firefox.
The fix also fixes a bug with slideshows not working on videos. And adds support for e6ai since it uses the same code as e621.
The updated code and instructions can be found at https://github.com/Temmie-Flakes/umami_extension/releases/tag/v1.0
It now works for both chrome and Firefox developer version.

Hey

I have fixed and uploaded to the mozzila addon store...

I will attempt to upload to the chromestore too, but it may get rejected, a manifest v3 rewrite would be a sizeable task...

Wolfgang you are my hero for making this in the first place, it's made my life so much better. And thanks to everyone helping to keep it working!

Ok chrome webstore claims 2.3.1 is published

If you are interested i have put the source up on github...

It is awful, and old... the whole thing started as an overgrown tampermonkey script, and uses a horrible gulp setup to build...

Edit:

Oops... looks like infinite scrolling is still broken... fixing

Fixed 2.3.2 released

Updated

wolfgang_senizen said:
Ok chrome webstore claims 2.3.1 is published

If you are interested i have put the source up on github...

It is awful, and old... the whole thing started as an overgrown tampermonkey script, and uses a horrible gulp setup to build...

Edit:

Oops... looks like infinite scrolling is still broken... fixing

Fixed 2.3.2 released

Thank you for keeping Umami updated. I've been using it for years, and my e621 experience wouldn't be the same without it.

Please add the feature to either enable / disable umami or disable open in new tab on click. Since installing the new version from chrome store (think I had some locally installed ver, but lost it??), it does this.
Edit: It also seems that in the slideshow mode, the upvote counter is duplicated. A post with say, 23 upvotes displays as "2323", value returns to expected value upon upvote
Edit 2: Image viewing is also messed up. If you open an image in a new tab and zoom in, the image will stretch whatever dimension doesn't fit on the screen.

Updated

gopy

Member

I'm sure its benign but can you explain the need for the permission 'read your browser history'?

iliketigers said:
Please add the feature to either enable / disable umami or disable open in new tab on click. Since installing the new version from chrome store (think I had some locally installed ver, but lost it??), it does this.
Edit: It also seems that in the slideshow mode, the upvote counter is duplicated. A post with say, 23 upvotes displays as "2323", value returns to expected value upon upvote
Edit 2: Image viewing is also messed up. If you open an image in a new tab and zoom in, the image will stretch whatever dimension doesn't fit on the screen.

I will look into it

gopy said:
I'm sure its benign but can you explain the need for the permission 'read your browser history'?

Strange, that feels like chrome has changed what they state for permissions

The permissings requested are

"permissions": [
        "tabs",
        "downloads",
        "storage",
        "*://*.e621.net/*",
        "*://*.e926.net/*",
        "*://*.e6ai.net/*"
    ]

Not sure which one is triggering that "read your browsing history" in chrome.

Firefox states

Access your data for sites in the e621.net domain
Access your data for sites in the e926.net domain
Access your data for sites in the e6ai.net domain
Download files and read and modify the browser’s download history
Access browser tabs

Which seems more accurate to me, and the extenstion doesn't touch the history part of downloads.

Maybe tabs is doing it? I should review and see exactly what api's im using.

But at no point does the extension comunicate with any service except e621, e926, or e6ai and only then to make requests to get content, or submit upvotes/faves

No data is collected on my part at all nor is anything extra info about you sent to e621's servers.

  • 1