Welcome Guest ( Log In | Register )

> Gallery Filecount, Userscript displaying the number of files in a gallery

 
post Nov 24 2013, 23:38
Post #1
blue penguin



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


This was requested many times in the E-Hentai Galleries feature requests, but I have not yet seen userscripts for this. Therefore, here is a userscript to display the number of files in the main pane of galleries. The appearance isn't the most beutiful thing in the world but have a look at the following example (the number of files is after "fc:"):
Attached Image

The script uses the website's API therefore it shall not give you problems of opening too many windows at the same time.

The script is now tracked on github, download it from [github.com] here
But here is the zip for the lazy ones: Attached File  gallery_size.user.js.zip ( 1.47k ) Number of downloads: 187


NOTES:
  • Tested with greasemonkey+firefox only. I was careful to be chrome compliant, but I did not test it. If you find that it does not work in chrome feel free to send me a patch (I don't have an OS that runs chrome without a lot of effort to install it).
  • It shall be trivial to adapt the script to other sites. Just remember to change @include lines and (this is IMPORTANT) to change
    CODE
    var apiurl = "http://ehentaihip.com/api.php";
    to comply with browser same origin policy.
  • It might fail in some cases when the Paging Enlargement III perk is in effect. This is due to the nature of the API.
  • FIXME: The script depends on the fact that the API response returns the metadata about the galleries in the same order as it was requested, but this fact is NOT specified in the API. If Tenboro changes the API and this becomes not true anymore the script will assign the filecounts to galleries wrongly. This is not a problem right now but it might appear later.

VERY LATE EDIT: this thing is on github: [github.com] https://github.com/neptunepenguin/eh_script...ry-size.user.js (not that i have added any new features recently)

This post has been edited by blue penguin: Dec 8 2015, 04:26
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: 8th October 2024 - 22:46