Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [Script] List Mode: No More Previews [My Home Option Enhancement], No more gallery front page preview pop-ups in List Mode

 
post Apr 29 2017, 00:25
Post #1
@43883




************
Group: Gold Star Club
Posts: 31,466
Joined: 6-March 08
Level 500 (Newbie)


Many more interesting scripts by dedicated community members here; go check'em out and don't hesitate to write your own after reading the OP!
Also, please read the wiki - and update/fix it if you feel like it - every now and then to make sure your own EH knowledge database is up-to-date, thank you!

If you aren't satisfied with the current My Home options:
QUOTE
Thumbnail Settings
How would you like the mouse-over thumbnails on the front page to load when using List Mode?
- On mouse-over (pages load faster, but there may be a slight delay before a thumb appears)
- On page load (pages take longer to load, but there is no delay for loading a thumb after the page has loaded)
...then this dirty quickie might be for you. It will block all requests for previews regardless of whether you want to see them.

What it adds (no, it is not a radio button, don't go around My Home and think it'll magically show up)
QUOTE
- Never (pages load faster and never attempt to retrieve gallery covers as previews, saving network load on both sides)
How to use
- First, make sure you have GreaseMonkey or TamperMonkey installed.
- Make sure you have List Mode enabled in My Home.
- Then, make sure you select the On mouse-over option in My Home and Apply the changes. This is basically an enhancement for it, and on page load would defeat the purpose by pre-caching a prebuilt stack image with all of the gallery covers for that page.
- Copy and paste the script in GM/TM as a new script from the clipboard, or save it as a .js file and drag and drop it, or open it with GM/TM.
- Go ahead and try it!

How to check whether the script works
- Hover a gallery title in List Mode. If it doesn't show any thumbnail, good, but better make sure, see below.
- Open your Browser Console (check your browser docs on how to do it) and enable JS and Network logging. No preview queries should happen at all, effectively saving Tenboro's servers some workload in the process as thumbs are loaded from EHGT servers, not H@H.
CODE
// ==UserScript==
// @name     EH-ListMode-NoPreview
// @include  https://e-hentai.org/*
// @grant    none
// @version  20170501
// ==/UserScript==

document.body.appendChild(document.createElement('script')).textContent=
'function show_image_pane(){}function hide_image_pane(){}';

This can easily be enhanced to let you selectively whitelist and blacklist some galleries with minor CSS tweaks. You are more than welcome to give it a try and learn some code in the process. Do make sure to keep a working backup!

The script is provided under the [en.wikipedia.org] WTFPL license as usual; free to modify and redistribute in any way you see fit.

Known issues
- Selecting an element too quickly may still fire show_image_pane before the function is overridden, usually if you go back to the previous page. Refresh.

EDITS:
- Code fixed with a much better alternative, courtesy of Master Superlatanium. Many thanks! :)
- Thanks blue penguin. And yes, [developer.mozilla.org] daily reminder that == is not the same as === and [developer.mozilla.org] our emptinesses are different. :duck:

This post has been edited by Luna_Flina: Apr 29 2017, 20:12
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 29 2017, 05:05
Post #2
blue penguin



in umbra, igitur, pugnabimus
***********
Group: Gold Star Club
Posts: 10,045
Joined: 24-March 12
Level 500 (Godslayer)


Added to script index. I wonder if we can suggest this script for all those yaoi (or anything else) haters.

Also
CODE
(undefined == null === true) !== (undefined === null === true)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


Lo-Fi Version Time is now: 29th April 2024 - 23:06