7 Pages V  1 2 3 > »   
Reply to this topicStart new topic
> Mayriad's EH Master Script, Adds Dozens of Features to E-Hentai - Latest Release: v2.1.3 on 25 December 2020 UTC

 
post Dec 10 2019, 19:48
Post #1
Mayriad



SUPER ★ AFK ★ TIME
*******
Group: Global Mods
Posts: 1,719
Joined: 18-December 10
Level 101 (Lord)


Attached Image

"No matter how much I struggled, it turns out a website has its limits. That is why... I WROTE A USERSCRIPT, JOEJOE!"

[openuserjs.org] Userscript Download | [github.com] User Manual | Latest Release: v2.1.3 on 25 December 2020 UTC

Please read the [github.com] user manual for more detailed information on setup instructions, feature descriptions and the automated gallery downloads feature. This post only has the features and preface sections from the manual. In case you do not know how userscripts work, you need to firstly add a browser extension like [www.tampermonkey.net] Tampermonkey, and then add the scripts to run them.

Features

This is just short list to quickly show its features before even the preface below. A longer list with explanations is provided in the [github.com] wiki. You can selectively enable any of the features below, except for the GUI control panel, which is always on.

Site-wide features:

- Scientific dark theme
- Scientific light theme
- Design fixes (enabled by default)
- Subjective fixes (enabled by default)
- Improved navigation bar (enabled by default)
- Comment and forum filters
- Jump to top/bottom buttons (enabled by default)
- Dawn reward extension (enabled by default)

Gallery list features:

- Additional gallery filters
- Unselect category buttons
- Full titles above thumbnails (enabled by default)
- Gallery colour coding (enabled by default)
- Automated gallery downloads
- Open galleries in tabs (enabled by default)

Gallery view features:

- Vigilante thread links (enabled by default)
- Alternative rating system (enabled by default)
- Clickable external URLs (enabled by default)

Image view features:

- Basic viewer fit-to-screen (enabled by default)
- MPV fit-to-screen (enabled by default)
- Hide MPV toolbar (enabled by default)
- Remove MPV tooltips
- Relocate MPV thumbnails (enabled by default)

Upload management features:

- Upload guide links (enabled by default)

Script features:

- GUI control panel (always on)
- LANraragi metadata plugin (available by default in LANraragi)

Preface

1) First of all, please ask me if you need help, but be sure to read the [github.com] user manual first and also the [github.com] wiki if needed. To keep this manual/readme easy to read, a lot of information is placed in the [github.com] wiki. Most users who have problems with the automated gallery downloads feature simply did not complete the setup according to the instructions.

2) This is the public version of a private script I wrote for myself over the years. I did a lot of extra work and made this public version just to help others improve their experience on EH. I would be happy if you find my script useful, but otherwise I have nothing to gain from it.

3) Since this is just a private script I wrote for myself, it naturally does not collect any information from the user and does not do any fishy stuff. The code is self-contained, fully transparent, very readable and well documented, so it should be easy to inspect if you would like to have a look.

4) I am purely self-taught, so I am not a real programmer and may have limited ability to debug telepathically and fulfil feature requests. Real life constraints also make it difficult for me to work on this script. However, I am quite confident in its quality and readability, since I did spend several years and hundreds of hours on it.

5) Although I have been using this script for years, it is too big (5,000+ lines of code) for me to test all usage scenarios on all platforms, browsers, userscript engines and EH pages. I know there are a few errors that the script cannot handle, because I cannot even trigger and see them in the first place. Therefore, there might be bugs and you can always submit a report to me to solve any problem you find.

This post has been edited by Mayriad: Dec 25 2020, 12:50


--------------------
My uploads | Mayriad's EH Master Script: Adds dozens of features to E-Hentai
[Young and Carefree] Life at the Shuchiin Academy ~ We Got Dank Vibes! ~: SHUCHIIN IS LIT AF (GSC only)
Currently airing: かぐや様は中国語を教えたい ~モデレーターたちのスパム頭脳戦~ / Kaguya-sama: Moderation Is War
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 10 2019, 20:05
Post #2
Shank



Roll for Initiative
*********
Group: Global Mods
Posts: 5,462
Joined: 19-May 12
Level 500 (Ponyslayer)



You got it in before christmas after all smile.gif Been looking forward to trying it

This post has been edited by Ubershank: Dec 10 2019, 20:06
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 11 2019, 01:25
Post #3
PrincessKaguya



On the Payroll
**********
Group: Global Mods
Posts: 7,521
Joined: 12-August 19
Level 403 (Dovahkiin)


christmas is coming a bit early this year biggrin.gif


--------------------

----------------------------------------------------------------------------
K+ | My Uploads | Tagging 101 (Adv) | ฅ^•ﻌ•^ฅ
----------------------------------------------------------------------------
QUOTE
Entitled freeloaders and their minions have been a disaster for the human race.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 11 2019, 13:47
Post #4
nikgtasa



Newcomer
*
Group: Members
Posts: 21
Joined: 9-December 12
Level 181 (Lord)


Holy shit you actually made it you mad lad. I salute you!

____
I've been seeding not personalized torrent files but if i add personalized torrent file and it merges together, do i get tracked for seeding?

This post has been edited by nikgtasa: Dec 11 2019, 15:02
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 11 2019, 17:01
Post #5
Mayriad



SUPER ★ AFK ★ TIME
*******
Group: Global Mods
Posts: 1,719
Joined: 18-December 10
Level 101 (Lord)


QUOTE(nikgtasa @ Dec 11 2019, 13:47) *
Holy shit you actually made it you mad lad. I salute you!

This script does make me feel like a madlad when I look back; I did not know JavaScript, HTML and CSS at all when I first started a few years ago, and now I have written this huge script...

QUOTE(nikgtasa @ Dec 11 2019, 13:47) *
I've been seeding not personalized torrent files but if i add personalized torrent file and it merges together, do i get tracked for seeding?

This question relates to EHTracker and torrenting in general, and I do not know these well enough to answer it. You will need someone else like blue penguin or even Tenboro himself to provide a definite answer.

What I know is that loading a personalised torrent on top of an already loaded redistributable torrent will add the personalised tracker that contains your UID and your key, so the torrent in your client will have the redistributable tracker first and then the personalised tracker.

However, when I tested this arrangement just now, the newly added personalised tracker just says "not contacted yet" while the existing redistributable tracker is working, so they might be mutually exclusive and I cannot say if your stats will be recorded this way. Furthermore, even if they can both work, perhaps the traffic will be split and only a proportion of your seeding amount will be recorded.

In any case, if you are not aware already, the torrent stats in "my home" do not affect anything on EH besides the love you will get from us, so I think you will not have a major problem.


--------------------
My uploads | Mayriad's EH Master Script: Adds dozens of features to E-Hentai
[Young and Carefree] Life at the Shuchiin Academy ~ We Got Dank Vibes! ~: SHUCHIIN IS LIT AF (GSC only)
Currently airing: かぐや様は中国語を教えたい ~モデレーターたちのスパム頭脳戦~ / Kaguya-sama: Moderation Is War
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 11 2019, 20:20
Post #6
Shank



Roll for Initiative
*********
Group: Global Mods
Posts: 5,462
Joined: 19-May 12
Level 500 (Ponyslayer)


I've tested most of the features now and got it pretty much set up how I like it, only problem I'm having is the popup with the gallery information is very hard to read on most non colour manga/doujinshi, see screenshot below:
Attached Image
As a temporary fix, I've added:
CODE

#topControlGroup > h1, #i2, #i4, #i5, #i6, #i7
{
    background: rgba(0, 0, 0, 0.4);
}

but it's a very ugly fix, as the divs overlap each other. I messed around with text shadow as well, though without much success.
Attached Image
I can live with it, but thought I'd bring it to your attention in case you've got an idea for a more elegant solution.

Edit: Above "fix" almost certainly won't work on IE.

This post has been edited by Ubershank: Dec 11 2019, 20:23
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 12 2019, 03:47
Post #7
Mayriad



SUPER ★ AFK ★ TIME
*******
Group: Global Mods
Posts: 1,719
Joined: 18-December 10
Level 101 (Lord)


QUOTE(Ubershank @ Dec 11 2019, 20:20) *
I can live with it, but thought I'd bring it to your attention in case you've got an idea for a more elegant solution.

A valid request. The fit-to-screen feature for the basic viewer was a by-product I made out of interest and has been neglected for too long since I always use the MPV. I have added semi-transparent shading strips behind the texts to make them easier to read, and you will get them at the next update.

QUOTE(Ubershank @ Dec 11 2019, 20:20) *
Edit: Above "fix" almost certainly won't work on IE.

The EH gallery system officially does not support IE and other older browsers at least after the gallery list revamp, so I do not consider compatibility with IE at all.

On unrelated notes:

- The clickable external URLs feature can fulfil one of Joe's gallery ideas: "add 'ehwiki.org' as an auto-linkified domain for gallery comments/description."

- EH will reach 5 million registered members in two or three days. Right now we have 4,999,633 members.


--------------------
My uploads | Mayriad's EH Master Script: Adds dozens of features to E-Hentai
[Young and Carefree] Life at the Shuchiin Academy ~ We Got Dank Vibes! ~: SHUCHIIN IS LIT AF (GSC only)
Currently airing: かぐや様は中国語を教えたい ~モデレーターたちのスパム頭脳戦~ / Kaguya-sama: Moderation Is War
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 12 2019, 04:49
Post #8
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Global Mods
Posts: 10,025
Joined: 24-March 12
Level 500 (Godslayer)


Neat script. Yeah, we talked about it before, but it is still neat. And up it goes (pined).

QUOTE(mayriad @ Dec 10 2019, 17:48) *
but I am going to take a break from EH after that.
That's sad. But absolutely do it, having a break from time to time prevents one from turning into a monster. (figuratively speaking that's very often the case with any activity).


--------------------
QUOTE(blue penguin @ Jun 21 2021, 17:24)
For 10 years of my life I have refused to add if-else blocks in order to support internet explorer idiocy, am not going to start doing it now in order to support google chrome's idiocy. Sorry folks. As harsh as the advice sounds my advice will be: use a browser that follows IETF standards.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 12 2019, 11:37
Post #9
pwnmastr



Newcomer
**
Group: Members
Posts: 52
Joined: 5-December 12
Level 284 (Godslayer)


From what I've tested so far with Violentmonkey in Firefox, some of the features work, but I can't see the 'Configure Mayriad's Script' button (nor with Greasemonkey, but I know that's unsupported), even when using default Firefox profile and no other extensions/scripts. Tampermonkey sketches me out, so I'll be testing via the in-script settings to see what works and what doesn't. For all I know, the button could be the only thing broken.

This post has been edited by pwnmastr: Dec 12 2019, 12:34
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 12 2019, 16:52
Post #10
Mayriad



SUPER ★ AFK ★ TIME
*******
Group: Global Mods
Posts: 1,719
Joined: 18-December 10
Level 101 (Lord)


QUOTE(blue penguin @ Dec 12 2019, 04:49) *
Neat script. Yeah, we talked about it before, but it is still neat. And up it goes (pined).

Thanks!

QUOTE(pwnmastr @ Dec 12 2019, 11:37) *
From what I've tested so far with Violentmonkey in Firefox, some of the features work, but I can't see the 'Configure Mayriad's Script' button (nor with Greasemonkey, but I know that's unsupported), even when using default Firefox profile and no other extensions/scripts. Tampermonkey sketches me out, so I'll be testing via the in-script settings to see what works and what doesn't. For all I know, the button could be the only thing broken.

I had a look and it seems the script will stop working on Violentmonkey because the GM API v3 used by Violentmonkey accepts XHR error handlers in a different place. Some features worked for you because they happened before the problematic part in the code; the features after this part did not because the script stopped running after that part. This is why the "configure master script" button did not show up, because it is late in the load order.

I think I noticed this problem in the past but forgot to fix it. Violentmonkey has one or two problems that really annoyed me, so I have not tested the script on it recently. For example, if I remove a script and install it again, which happens often during testing, Violentmonkey will insist that there is a script name or namespace conflict even though there is no script installed. Then I would have to reinstall Violentmonkey itself to fix this.

Anyway, this is a small problem and it has been fixed, so the script should run on Violentmonkey after the next update. Violentmonkey is still largely untested, so there might be bugs still. If there is no more stuff to fix for now, I will probably push the next update tomorrow.


--------------------
My uploads | Mayriad's EH Master Script: Adds dozens of features to E-Hentai
[Young and Carefree] Life at the Shuchiin Academy ~ We Got Dank Vibes! ~: SHUCHIIN IS LIT AF (GSC only)
Currently airing: かぐや様は中国語を教えたい ~モデレーターたちのスパム頭脳戦~ / Kaguya-sama: Moderation Is War
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 12 2019, 18:40
Post #11
Shank



Roll for Initiative
*********
Group: Global Mods
Posts: 5,462
Joined: 19-May 12
Level 500 (Ponyslayer)


QUOTE(mayriad @ Dec 10 2019, 17:48) *

but I am going to take a break from EH after that

Forgive me, I (admittedly rudely) only skimmed the feature list and missed this part, that's sad to hear. Hopefully you have a good break.

QUOTE(mayriad @ Dec 12 2019, 01:47) *

I have added semi-transparent shading strips behind the texts to make them easier to read, and you will get them at the next update.

You work fast! Looking forward to it.

QUOTE(mayriad @ Dec 12 2019, 01:47) *

The EH gallery system officially does not support IE and other older browsers at least after the gallery list revamp, so I do not consider compatibility with IE at all.

Adding that disclaimers with most css features I make is a bad habit of mine, even if it's largely pointless as I doubt many people are still using IE.

QUOTE(mayriad @ Dec 12 2019, 01:47) *

- EH will reach 5 million registered members in two or three days. Right now we have 4,999,633 members.

I wonder how many of those are actually active users lol.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 13 2019, 21:25
Post #12
Mayriad



SUPER ★ AFK ★ TIME
*******
Group: Global Mods
Posts: 1,719
Joined: 18-December 10
Level 101 (Lord)


Patch update: Mayriad's EH Master Script v2.0.1

## Changelog

- Added alternative placement for XHR error handlers to support the GM API v3 used by Violentmonkey. This is why the last version of this script did not really work on Violentmonkey.

- Added a helper function that renames object properties after a script update without affecting their values.

- Fixed one typo in loadData() which can mess up user settings in a script update. Fortunately, no one could have been affected by this typo since it is fixed in the first public update ever.

- Modified fitViewerToScreen() to add semi-transparent shading strips behind the texts to make them easier to read in this mode.

- Renamed the gallery download shortcuts feature to "automated gallery downloads", which better reflects what it does after the overhaul based on GM.download().

- Cleaned up some code since Violentmonkey now also supports GM.* aliases that are compatible with GM API v4.

- Applied trivial wording, line wrap, and variable name changes.


--------------------
My uploads | Mayriad's EH Master Script: Adds dozens of features to E-Hentai
[Young and Carefree] Life at the Shuchiin Academy ~ We Got Dank Vibes! ~: SHUCHIIN IS LIT AF (GSC only)
Currently airing: かぐや様は中国語を教えたい ~モデレーターたちのスパム頭脳戦~ / Kaguya-sama: Moderation Is War
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 13 2019, 21:30
Post #13
Shank



Roll for Initiative
*********
Group: Global Mods
Posts: 5,462
Joined: 19-May 12
Level 500 (Ponyslayer)


QUOTE(mayriad @ Dec 13 2019, 19:25) *


- Modified fitViewerToScreen() to add semi-transparent shading strips behind the texts to make them easier to read in this mode.


This looks so much better now, you're a legend
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 14 2019, 10:22
Post #14
pwnmastr



Newcomer
**
Group: Members
Posts: 52
Joined: 5-December 12
Level 284 (Godslayer)


Seems to be working excellently in Violentmonkey now, thanks!

Tbh, I'm having trouble spotting differences with the 'fix website design problems' and 'apply subjective fixes' options. Where should I be looking?

This post has been edited by pwnmastr: Dec 15 2019, 09:42
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 14 2019, 16:00
Post #15
Mayriad



SUPER ★ AFK ★ TIME
*******
Group: Global Mods
Posts: 1,719
Joined: 18-December 10
Level 101 (Lord)


QUOTE(pwnmastr @ Dec 14 2019, 10:22) *
Tbh, I'm trouble spotting differences with the 'fix website design problems' and 'apply subjective fixes' options. Where should I be looking?

You should be looking at my documentation in the code if you want to know the differences these features make. They fix quite a number of problems throughout the gallery system, and most of these problems are either not very noticeable or occur rarely. The functions for these features are called applyDesignFixes() and applySubjectiveFixes() in the code, and I think I have documented my code more than well enough for you to know everything they do. I think Tenboro should read applyDesignFixes(), too.

I am quoting some of my comments from applyDesignFixes() to give you an idea in case you do not want to read the code:
CODE
      // Fix the colour used for the titles of visited galleries, because the default colour is not distinct enough. The
      // new colour in each theme is calculated by blending the background colour of div.ido and the colour of unvisited
      // titles in the ratio of 3:1.
...
      // Fix the "no unfiltered results in this page range" message from second-stage filters. It has two problems:
      // 1. The span of this message's row in minimal(+) display modes is one column short.
      // 2. The table header row exists in all display modes other than extended, which is inconsistent, and it should
      //    not exist in the thumbnail gallery list display mode, which does not use a details table.
...
        // Change the "your filters excluded * galleries from this page" part to say "page range" when the gallery list
        // is showing filtered results from multiple pages at once.
...
        // Change the "showing * galleries" part to say "showing * out of * galleries", where the first number is the
        // actual number of galleries in the current list and the second is the total number of galleries found in a
        // search before deductions from the standard second-stage filters, the additional filters from this script, and
        // indexing delay. Since this feature function runs after applyAdditionalFilters(), the effects of additional
        // filters will be included and the correct count will be shown. However, the effect of indexing delay cannot be
        // accounted for, which probably mainly affects updated galleries.
...
      // Fix the vertical position of ponies so that they align with the border of gallery lists.
...
      // Fix the missing border at the top-right corner of each graph [on the stats page].
...
      // Recreate the navigation bar using the new style on [the upload management page and repo.e-hentai.org], which
      // still use the old navigation bar. They use the old 0338 style sheet, so the new styles from 0347 are added to
      // support the recreated bar. Swapping the style sheet makes little difference, so it is not worth a total reflow.
...
          // Refit the height of the "choose files" button in gallery upload pages, because the bottom border was too
          // low and inconsistent with other buttons of the same type, like the file search button.
...

Yes, I even fixed the ponies.


--------------------
My uploads | Mayriad's EH Master Script: Adds dozens of features to E-Hentai
[Young and Carefree] Life at the Shuchiin Academy ~ We Got Dank Vibes! ~: SHUCHIIN IS LIT AF (GSC only)
Currently airing: かぐや様は中国語を教えたい ~モデレーターたちのスパム頭脳戦~ / Kaguya-sama: Moderation Is War
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 15 2019, 06:23
Post #16
Shank



Roll for Initiative
*********
Group: Global Mods
Posts: 5,462
Joined: 19-May 12
Level 500 (Ponyslayer)


Sorry about this, but came across a div that didn't have it's colour changed on the scientific dark theme, on the bounties page:
Attached Image

As a temporary fix, I've added div#x
{background:#4f535b;border: 1px solid #8d8d8d}

Which changes it to this:
Attached Image

Edit: just went through every single page accessible through the galleries that I could think of, and that's the only problematic one I could find.

This post has been edited by Ubershank: Dec 15 2019, 06:28
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 15 2019, 12:57
Post #17
Mayriad



SUPER ★ AFK ★ TIME
*******
Group: Global Mods
Posts: 1,719
Joined: 18-December 10
Level 101 (Lord)


QUOTE(Ubershank @ Dec 15 2019, 06:23) *
Sorry about this, but came across a div that didn't have it's colour changed on the scientific dark theme, on the bounties page:

Thank you for spotting. It looks like another element whose style is hidden in document.head. It will be fixed at the next update.


--------------------
My uploads | Mayriad's EH Master Script: Adds dozens of features to E-Hentai
[Young and Carefree] Life at the Shuchiin Academy ~ We Got Dank Vibes! ~: SHUCHIIN IS LIT AF (GSC only)
Currently airing: かぐや様は中国語を教えたい ~モデレーターたちのスパム頭脳戦~ / Kaguya-sama: Moderation Is War
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 15 2019, 13:00
Post #18
pwnmastr



Newcomer
**
Group: Members
Posts: 52
Joined: 5-December 12
Level 284 (Godslayer)


QUOTE(mayriad @ Dec 14 2019, 16:00) *

You should be looking at my documentation in the code if you want to know the differences these features make. They fix quite a number of problems throughout the gallery system, and most of these problems are either not very noticeable or occur rarely. The functions for these features are called applyDesignFixes() and applySubjectiveFixes() in the code, and I think I have documented my code more than well enough for you to know everything they do. I think Tenboro should read applyDesignFixes(), too.

Ah, I should've known to look in the code since you did say it is well documented. Now that I've used it some more, I'm already benefiting from a couple of the changes to things that always slightly bothered me before, like the more faded 'visited galleries' titles. Really great, expansive script you've made here.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 24 2019, 21:28
Post #19
nikgtasa



Newcomer
*
Group: Members
Posts: 21
Joined: 9-December 12
Level 181 (Lord)


There's a bad bug that prevents the page download from working. If one gallery's torrent is unavailable then any download after that gallery stops.
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post

 
post Dec 24 2019, 21:48
Post #20
Mayriad



SUPER ★ AFK ★ TIME
*******
Group: Global Mods
Posts: 1,719
Joined: 18-December 10
Level 101 (Lord)


QUOTE(nikgtasa @ Dec 24 2019, 21:28) *
There's a bad bug that prevents the page download from working. If one gallery's torrent is unavailable then any download after that gallery stops.

Example? The page download should continue after the notification popup goes away.

Edit: this is normal behaviour because unknown errors would stop the page download mode. However, a few other immaterial bugs have been identified after a few lengthy PMs and the next update that was put on hold will be released now.

This post has been edited by mayriad: Dec 26 2019, 00:55


--------------------
My uploads | Mayriad's EH Master Script: Adds dozens of features to E-Hentai
[Young and Carefree] Life at the Shuchiin Academy ~ We Got Dank Vibes! ~: SHUCHIIN IS LIT AF (GSC only)
Currently airing: かぐや様は中国語を教えたい ~モデレーターたちのスパム頭脳戦~ / Kaguya-sama: Moderation Is War
User is offlineProfile CardPM
Report PostGo to the top of the page
+Quote Post


7 Pages V  1 2 3 > » 
Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
1 Members: thedemacia

 


Lo-Fi Version Time is now: 26th September 2022 - 08:19