Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> [Script Request] Unread gallery highlighter, (hopefully better than the "new" image on the new galleries)

 
post Dec 14 2016, 23:50
Post #1
blue penguin



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


I'm trying to make a precedent for how a script request thread should look like, I'll outline some requirements as much as I can.

I mark galleries that I have read by rating them, so I can see that I have looked at it and perhaps even tagged it. I mostly look at tag galleries that have tag flags since there is a higher chance that those will contain my fetishes. Therefore, when I look at a page of the galleries (that is not one of the first ones), galleries that are flagged but I had not rated are the most important ones to look at.

If I had a way of highlighing exactly those galleries it would be a huge plus.

In other words: I'd love to have a script that, for a gallery that is flagged but has not been rated, would change the <tr> style to something more visible. Maybe border-spacing: 1.5em; or similar stuff would work but I'm pretty bad with visual stuff (I've tried border: 3px red solid; , it works but looks horrible).

---------

Extra info (not really required for a script request): a rated gallery has class=irg in the stars (a non rated has no such class). A flagged gallery has an extra <div> class=it4t and a <div> class=tfl inside it. Therefore it is pretty much about a loop going through all galleries and change style= on all ones that contain the tag flagging <div> but do not have the class=irg on the next <div>.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 14 2016, 23:52
Post #2
Jay Low



Casual Poster
****
Group: Members
Posts: 434
Joined: 9-July 12
Level 275 (Lord)


I actually have a script for this done by necessity. It is a juggernaut of mishmash of stuff with stuff I stuffed in in spagetti code of thing that sorta works.

If you want, I can ask my friend who can program to get the spagetti straighten and that part (which was made by him, tbh) out of the code I have.

This post has been edited by Jay Low: Dec 14 2016, 23:53
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 15 2016, 00:25
Post #3
FabulousCupcake



Casual Poster
****
Group: Gold Star Club
Posts: 475
Joined: 15-April 14
Level 439 (Dovahkiin)


.irr, .irg, and .irb are used to color the stars; if any of these exist then the gallery is rated.
(they stand for red, green, and blue, by the way)
A gallery that has a flag (any flag) will have .it4t adjacent the stars rating element.

With these two points, we can use pure stylesheet selector to mark Flagged but Not Rated galleries.
With the ability to select elements correctly — even partially — means that we can throw in more stylesheet hacks and make some visual feedback for the rows.

Result:
CODE
.it4r:not(.irr):not(.irg):not(.irb) + .it4t {
    content: '';
    display: block;
    background: linear-gradient(90deg, transparent, rgba(255,0,0, .5)) !important;
}


Screenshot:
(IMG:[my.mixtape.moe] https://my.mixtape.moe/cpigyu.png)
You can, of course, modify how it should look; I just used linear gradient background as an example.


FYI: you can use Stylish to inject stylesheets on-the-fly like Greasemonkey.
Install links:
[addons.mozilla.org] Firefox
[chrome.google.com] Chrome

If you insist on installing it as userscript, it should be pretty easy to extract the stylesheet injection mechanism from many of the scripts available.

———

Slightly off-topic: Should we lump together stylesheets as scripts in future discussions?
Some are really simple, but they can be useful too!

e.g. : Create a visual indicator every each 25th row, which I found useful after getting myself Paging Enlargement.
[my.mixtape.moe] [preview]

This post has been edited by blue penguin: Dec 15 2016, 00:47
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 15 2016, 00:46
Post #4
blue penguin



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


Pretty awesome. The gradient is definitely a better visual than a horrible border. Thanks.

Btw, Stylish is fine. We have that on the wiki even.

On the other hand I never ever got the hang of the match line:
CODE
@-moz-document regexp("https?://(g\\.e-|stuff)hentai\\.org/(\\?page=\\d+)?")
(I never ever used stylish before)

It seems to work, but I'm not sure if it will work on chrome.

PS: I fixed a typo in your code.

QUOTE
Slightly off-topic: Should we lump together stylesheets as scripts in future discussions?
Definitely. The wiki already consider them the same (please do not be pedantic and argue that they're not). There is no problem in using the same index.

This post has been edited by blue penguin: Dec 15 2016, 00:48
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 15 2016, 00:56
Post #5
FabulousCupcake



Casual Poster
****
Group: Gold Star Club
Posts: 475
Joined: 15-April 14
Level 439 (Dovahkiin)


I would just use @-moz-document domain(g.e-hentai.org) {.
Even if it doesn't affect anything, the performance impact should be negligible.
Maybe even smaller than using the regexp pattern matching for @document alone

QUOTE(blue penguin @ Dec 14 2016, 23:46) *

PS: I fixed a typo in your code.

I'm dying to know what it was

This post has been edited by FabulousCupcake: Dec 15 2016, 00:59
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 15 2016, 01:13
Post #6
blue penguin



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


QUOTE(Jay Low @ Dec 14 2016, 21:52) *
I actually have a script for this done by necessity. It is a juggernaut of mishmash of stuff with stuff I stuffed in in spagetti code of thing that sorta works.

If you want, I can ask my friend who can program to get the spagetti straighten and that part (which was made by him, tbh) out of the code I have.
Btw, thanks for contributing. I guess now you too can use FabulousCupcake's one, since less code often results in less bugs (and stylish should be faster than greasemonkey if you are changing style=).

QUOTE(FabulousCupcake @ Dec 14 2016, 22:56) *
I would just use @-moz-document domain(g.e-hentai.org) {.
Even if it doesn't affect anything, the performance impact should be negligible.
Maybe even smaller than using the regexp pattern matching for @document alone
Oh cool, I see that @document is a [developer.mozilla.org] comma separated list. So yeah, that probably makes sense.
QUOTE
I'm dying to know what it was
CODE
.it4r:not(.irg):not(.irg):not(.irb) + .it4t {
to
CODE
.it4r:not(.irr):not(.irg):not(.irb) + .it4t {
It was obvious it was a typo.

One more thing: Do you want to add post including the code and @document and an @namespace too? I would be easier to copy-paste for someone looking at the script index.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 15 2016, 01:24
Post #7
FabulousCupcake



Casual Poster
****
Group: Gold Star Club
Posts: 475
Joined: 15-April 14
Level 439 (Dovahkiin)


Thanks for the typo fix

QUOTE(blue penguin @ Dec 15 2016, 00:13) *
One more thing: Do you want to add post including the code and @document and an @namespace too? I would be easier to copy-paste for someone looking at the script index.


Sure,
CODE
@-moz-document domain("g.e-hentai.org") {
.it4r:not(.irr):not(.irg):not(.irb) + .it4t {
    content: '';
    display: block;
    background: linear-gradient(90deg, transparent, rgba(255,0,0, .5)) !important;
}
}


This post has been edited by FabulousCupcake: Dec 15 2016, 10:51
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Dec 15 2016, 01:33
Post #8
blue penguin



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


You made the same typo again! Now, I'm not sure if I should fix it or it has some esoteric CSS meaning.

I've added the post to the index, thanks again.

EDIT: Fixed, thanks

This post has been edited by blue penguin: Feb 14 2017, 00:14
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 23 2020, 14:50
Post #9
Mizuto27



Newcomer
*
Group: Members
Posts: 23
Joined: 14-August 18
Level 248 (Godslayer)


Hi,
I want to install the script in UC browser which is a chromium browser but I didn't succeed
Can you help me ?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 23 2020, 16:47
Post #10
Elevens



Casual Poster
****
Group: Members
Posts: 271
Joined: 18-December 10
Level 130 (Ascended)


>I want to install the script in UC browser which is a chromium browser but I didn't succeed

[www.tampermonkey.net] Tampermonkey seems to have a version for UCWeb browser. Maybe try installing that instead of Greasemonkey, see if that works.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 23 2020, 17:21
Post #11
Mayriad



SUPER ★ BUSY ★ TIME
*******
Group: Global Mods
Posts: 2,061
Joined: 18-December 10
Level 127 (Lord)


QUOTE(Mizuto27 @ Apr 23 2020, 14:50) *
Hi,
I want to install the script in UC browser which is a chromium browser but I didn't succeed
Can you help me ?

I do not see a full userscript in this thread, but in any case it should be outdated already and therefore no longer works on the current gallery system due to the 2019 revamp.
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 23 2020, 17:54
Post #12
Mizuto27



Newcomer
*
Group: Members
Posts: 23
Joined: 14-August 18
Level 248 (Godslayer)


I didn't know that, so it is pointless trying to make this script work ?
Do you have some alternatives i could use ?
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 23 2020, 17:58
Post #13
Shank



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


QUOTE(Mizuto27 @ Apr 23 2020, 16:54) *

I didn't know that, so it is pointless trying to make this script work ?
Do you have some alternatives i could use ?

I remember someone posting this script , which is slightly different to what you want, but remembers the position of the last gallery you read
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 23 2020, 18:15
Post #14
Mizuto27



Newcomer
*
Group: Members
Posts: 23
Joined: 14-August 18
Level 248 (Godslayer)


QUOTE(Ubershank @ Apr 23 2020, 18:58) *

I remember someone posting this script , which is slightly different to what you want, but remembers the position of the last gallery you read

Thank you, but it doesn't really do the job
I will do without for now and maybe tray learn to write a script until I found something similar on the forum
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

 
post Apr 23 2020, 19:17
Post #15
Mayriad



SUPER ★ BUSY ★ TIME
*******
Group: Global Mods
Posts: 2,061
Joined: 18-December 10
Level 127 (Lord)


QUOTE(Mizuto27 @ Apr 23 2020, 17:54) *
Do you have some alternatives i could use ?

Ah yes, one of the features of my script highlights unread galleries. It is enabled by default, so you just need to install my script: https://forums.e-hentai.org/index.php?showtopic=233955
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:54