I made a few user scripts for this site and others over the past several years. I'm feeling bored, so I decided I'd share some of them.
I apologise in advance, for most of these range from somewhat clunky to incredibly bodgy. But they work and I occasionally come back to work on optimizing them. They've been evolving organically for several years, which is just a nicer way of saying that they're pretty messy but they work.
----------------------------------------
First, a small one; it just makes it so you never have to scroll horizontally on e-hentai forums by forcing images to fit on the screen horizontally.
[
gitlab.com]
eh-forums-fit-images.user.js----------------------------------------
One of the more 'advanced' of them is '
[gitlab.com] image-view-tweaks,' which makes images fill the window E-H galleries and can be made to automatically resize images to fill or fit your window by the use of several hotkeys. It also moves the gallery title/header to below the image itself, so that you get more real estate without having to scroll.
The keys are:
- a: view in 'absolute' size (100%, how EHG normally operates). 'v' also will work.
- b: view in 'best fit'. Image height or width will be adjusted so that you don't have to scroll.
- h: fit to h height.
- w: fit to width.
Left and right arrow keys can still be used to navigate back and forth, as usual. When doing so, the image in the new page will automatically use the same view as the last image you looked at. Note that the resize doesn't happen until the image is fully loaded because I can't really get the script to determine the earliest possible point to apply the changes (while the image is loading, after the width and height have been determined but before loading is finished); I just have it apply when the image has been loaded. I have code to automatically try earlier than that at intervals, but I'm not certain it's doing much.
----------------------------------------
Another of them (
[gitlab.com] hotkeys) gives LOTS of sites hotkeys for browsing through. It provides arrow key navigation for most, and it also gives two keys that can be used to open the 'sources' of images. 'i' is used to view the image in a new tab, and 'o' to open the image in the current tab.
There are several caveats, which [
gitlab.com]
I explain in more detail in comments in the script's source code.
- Sites like e-hentai will require another addon to force images to be loaded inline instead of trying to download. I use 'InlineDisposition' and 'InlineDisposition Reloaded' (depending on firefox/mozilla browser derivative version).
- You need to change some hidden popup blocker settings to get it to open more than a few images in new tabs. The Javascript call I use is the same kind used by popups, so it's constrained by these rules. Note that this may impact your browser security.
The changes to about:config in firefox are:
- dom.popup_allowed_events:
Add 'keyup' to the end of the string.
I think Chrome/Chromium might not need this change? Unsure. But I know that the next tweak is impossible without recompiling Chromium so don't get your hopes up. - dom.popup_maximum:
Change from '20', or whatever it defaults to on your browser, to '0'.
Note that popup blockers will still block popups after this change, unless a given site is whitelisted. When whitelisted, it would normally still block popups after the 20th. This lets you open an infinite number of images in new tabs but also lets whitelisted sites generate lots of popups, so use it with an ad blocker.
To change this in Chrome, you need to compile it from source code; it's hardcoded in C. You probably can do it by editing 'chrome/browser/ui/blocked_content/popup_blocker_tab_helper.cc' and editing the variable 'kMaximumNumberOfPopups'. This pretty much cripples my script in Chrome/Chromium since compiling is long and not noob-friendly or RAM-friendly. - browser.tabs.loadDivertedInBackground:
Set to 'true'.
This makes the new tabs open in the background, so you can more quickly flip through pages and open multiple tabs. 'Force Background Tab' is a Chrome/Chromium extension that has the same effect.
- It doesn't work in chrome/chromium/other browsers based on it without installing several additional addons, and it still has one or two things that can't be changed in Chrome or Chromium without recompiling from source code. Check the script source comments for details.
It currently supports:
- e-hentai galleries
- rule34.paheal.net
- rule34.xxx
- Hentai-Foundry
- Gelbooru
- Sankaku Complex's booru
- Newgrounds
- Furaffinity
- e621.net
- Weasyl
- Inkbunny
- …And Wikipedia.
Why Wikipedia? I'm just as confused as you are. I forgot that I added it. But 'i' and 'o' will work on the media details page (not the built in 'media viewer' bullshit though because I don't use that).
----------------------------------------
I have more, but I'll post them later if this thread goes anywhere.
All of my scripts have been tested in GreaseMonkey 3.x, most also in 4.x (for current firefox). I think all of them work properly in Violentmonkey in modern firefox, too, and I think I should recommend it over GM 4.x because it is simply more compatible than GM4 currently. I tested most of them in Violentmonkey, and the ones I didn't are simple enough that I'm fairly confident they will work even without testing.
Tampermonkey may also work, but it's considered 'proprietary' nowadays so I refuse to test my scripts in it or recommend it to others. If it doesn't work in Tampermonkey, your complaints will be ignored unless the fixes are truly trivial.
I have a lot more scripts, but I'm going to need to clean them up a fair amount before sharing.
This post has been edited by dragontamer8740: Mar 25 2020, 11:58