Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [Script] EH Highlighter (API Version), Unlimited number of tags + does not require tag flagging perk

 
post Feb 27 2017, 21:50
Post #1
Simpleton8



Casual Poster
****
Group: Members
Posts: 336
Joined: 2-November 15
Level 264 (Godslayer)


I modified the [sleazyfork.org] highlighter script by hzqr/etc to use the api instead of tag flagging hath perk. The main different is that it allows you to highlight/filter gallery tags without tag flagging (whereas, for the newest version of EH highlighter, without tag flagging, you can only highlight/filter based on title & with tag flagging, the number of tags you can use is limited). The api portion is copied and pasted from [github.com] gallery size script by blue penguin (so it will probably not overload the server).

I have disabled tag flagging hath perk as it is useless with the script.

I wouldn't recommend using this script unless you want to use more tags than what's allowed by the tag flagging hath perk. It works for me on Firefox with Greasemonkey (haven't tested it on chrome/anywhere else). There are probably some issues (e.g., namespace in filter doesn't seem to work well, doesn't update highlighted galleries after color changes unless refreshed page - I think a couple of these issues exist in the original script as well).

10b is okay with this script; according to him, tag flagging hath perk is already something he's planning on making available to everyone after certain server-side optimizations have been made.

Warning: Don't try to open too many tabs with too many galleries at the same time (e.g., 10 tabs with 200 galleries each), otherwise it might overload the api and get ip banned. I'm "currently" looking into this issue.

Script: [gist.github.com] https://gist.github.com/anonymous/4fbe008e4...b63537a381864b0

P.S. I was hoping someone else would do this before me. Feel free to use it or make a better version (IMG:[invalid] style_emoticons/default/smile.gif). I'm still not familiar with >80% of the code.

This post has been edited by Simpleton8: Mar 1 2017, 21:33
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 28 2017, 21:10
Post #2
blue penguin



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


Hm... are these the same/similar modification you made here: https://forums.e-hentai.org/index.php?showtopic=193418 ? An extension to it?

If I'm not mistaken, with this the old thread is redundant right?

I'm asking so many questions because I do want to update the script index appropriately. Then random people will not come to that thread and ask for help with code that you are not using.maintaining anymore (IMG:[invalid] style_emoticons/default/smile.gif)

Good job btw,

For further improvement you may like tiap's API middleware. It would be nice to be able to have it as a config option. But then again, 'tis only a suggestion.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 28 2017, 21:54
Post #3
Simpleton8



Casual Poster
****
Group: Members
Posts: 336
Joined: 2-November 15
Level 264 (Godslayer)


Thanks. I was going to pm you about updating the script index to link to this thread instead.

1) This script here is better because it's updated from the newest version by hzqr/etc (2017-01-21 version). The main different is that it allows you to highlight/filter gallery tags without tag flagging (whereas, for the newest version of EH highlighter, without tag flagging, you can only highlight/filter based on title & with tag flagging, you can only use a limited amount of tags). (wasn't very clear in my first post)

I think one of the threads links to a script that just gets gallery metadatas with the api but doesn't actually use them (I was hoping etc/hzqr/someone else would update the highlighter script to use the api instead).

2) One of the old threads is actually about a different script i.e., hotkeys to append/fill in search language:english or language:chinese (e.g., with ctrl-x, z since I'm using mac). I don't think it's worthy of being added to script index since it's hard-coded (but it's easy to change): [gist.github.com] https://gist.github.com/anonymous/a260ec482...244abc78f068c26

3) Thanks for linking tiap's API middleware. I will first ask etc to consider this and using the api before trying to do it myself (IMG:[invalid] style_emoticons/default/smile.gif). Are hzqr/tiap and [sleazyfork.org] etc the same person?

This post has been edited by Simpleton8: Feb 28 2017, 22:06
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Feb 28 2017, 23:37
Post #4
hzqr



Savagely Still
********
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09
Level 462 (Dovahkiin)


QUOTE(Simpleton8 @ Feb 28 2017, 20:54) *
Are hzqr/tiap and [sleazyfork.org] etc the same person?
Yes
I've been wanting to rewrite the entire thing from scratch for a long time, but if laziness is an art I am a masterpiece
I'll probably rewrite it eventually, but I'm not planning to integrate it with the API at any point (at most I'll pointlessly expand the syntax for writing filters so it will finally become too complicated for anyone but me to understand)
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 1 2017, 01:16
Post #5
blue penguin



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


Index updated (correctly, i think, sorry if there are mistakes i'm a little tired).

QUOTE(hzqr @ Feb 28 2017, 21:37) *
Yes
I was pretty confident on that, thanks.

Also, we keep calling you tiap 'vause it is much easier to remember than hzqr. But chase me if that's annoying.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 1 2017, 02:33
Post #6
Simpleton8



Casual Poster
****
Group: Members
Posts: 336
Joined: 2-November 15
Level 264 (Godslayer)


QUOTE(hzqr @ Feb 28 2017, 23:37) *

Yes
I've been wanting to rewrite the entire thing from scratch for a long time, but if laziness is an art I am a masterpiece
I'll probably rewrite it eventually, but I'm not planning to integrate it with the API at any point (at most I'll pointlessly expand the syntax for writing filters so it will finally become too complicated for anyone but me to understand)


Thanks. EH wouldn't be the same without your script (IMG:[invalid] style_emoticons/default/smile.gif) . Any reason why you are not planning to integrate it with the API? To prevent users from triggering the API's flood protection (or whatever it's called)?

QUOTE(blue penguin @ Mar 1 2017, 01:16) *

Index updated (correctly, i think, sorry if there are mistakes i'm a little tired).

Looks good. Thanks.

__
I will probably look into API middleware later, but I'm also very lazy about this type of thing lol. I was planning on modifying the script since last May, so for the next update, I will probably end up hoping someone else will do it or until it becomes "necessary".

This post has been edited by Simpleton8: Mar 1 2017, 02:34
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 1 2017, 13:54
Post #7
hzqr



Savagely Still
********
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09
Level 462 (Dovahkiin)


QUOTE(Simpleton8 @ Mar 1 2017, 01:33) *
Any reason why you are not planning to integrate it with the API? To prevent users from triggering the API's flood protection (or whatever it's called)?

That's one of the reasons, yeah. And I'm relatively sure it would open up a can of worms that I really don't want to open
But mainly it's because it's a script I made primarily for myself, and the Tag Flagging perk is more than enough for me. It would ultimately become a feature that I don't need but that I'd still have to maintain, which is not a prospect I'm ecstatic about
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 1 2017, 15:00
Post #8
Simpleton8



Casual Poster
****
Group: Members
Posts: 336
Joined: 2-November 15
Level 264 (Godslayer)


QUOTE(hzqr @ Mar 1 2017, 13:54) *

That's one of the reasons, yeah. And I'm relatively sure it would open up a can of worms that I really don't want to open
But mainly it's because it's a script I made primarily for myself, and the Tag Flagging perk is more than enough for me. It would ultimately become a feature that I don't need but that I'd still have to maintain, which is not a prospect I'm ecstatic about


Thanks. Personally, I like being able to highlight all the artist I like. (at least more than ~100) (IMG:[invalid] style_emoticons/default/smile.gif).

I'm not sure if the script could be a problem if I open too many tabs at the same time(e.g., 10 tabs of 200 galleries each). I should probably check for unnecessary api calls / implement your API Support script sooner rather than later (will probably wait first to see the updates after server-side optimizations)

This post has been edited by Simpleton8: Mar 1 2017, 18:47
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 11 2017, 00:14
Post #9
hzqr



Savagely Still
********
Group: Gold Star Club
Posts: 4,672
Joined: 13-May 09
Level 462 (Dovahkiin)


I've added a thing in the latest version that lets the script automatically integrate with "external" tags, it could (potentially) make your life easier

Before: script looks for one or more tag flag icons, reads the tags from their "title" attributes and does its thing accordingly
Now: same as above happens, but if the gallery has an "eh-tags" attribute, the tags will be read from the value of said attribute instead (comma separated list of tags)

Thumbnail mode:

CODE
<!-- No eh-tags, tags will be read from the flag: -->

<div class="id1">
    [rest of the HTML code]
</div>

<!-- eh-tags, tags will be read from the attribute: -->

<div class="id1" eh-tags="misc:anthology,misc:group,female:glasses,...">
    [rest of the HTML code]
</div>


List mode:

CODE
<!-- No eh-tags, tags will be read from the flag: -->

<tr class="gtr0"> <!-- or "gtr1" -->
    [rest of the HTML code]
</tr>

<!-- eh-tags, tags will be read from the attribute: -->

<tr class="gtr0" eh-tags="misc:anthology,misc:group,female:glasses,...">
    [rest of the HTML code]
</tr>


You can also force the script to reset itself and re-parse the page (and pick up new "external" tags along the way) by using:

CODE
window.postMessage('ehWalk', '*');


That's about it
Don't feel compelled to use it if you don't want to, it's something I wanted to add to the next version at some point anyway
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Mar 11 2017, 00:37
Post #10
Simpleton8



Casual Poster
****
Group: Members
Posts: 336
Joined: 2-November 15
Level 264 (Godslayer)


Thanks. I'll probably wait til the updates after server-side optimizations. Fairly satisfied with the current script.
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 - 19:47