FIMFiction UserScripts 383 members · 0 stories
Comments ( 15 )
  • Viewing 1 - 50 of 15
Selbi
Group Admin

I know this isn't a script for FIMFiction itself, but it's still a pony fandom site, so I figured it couldn't harm posting it here.

Download

This script adds a "Sort-by-Score" button next to the search bar that directly sorts the search results by score, in case you quickly want to see the top pictures of your entered tags.

:pinkiegasp::rainbowderp::raritystarry::derpyderp1:

You sir, are a saint!

yrfoxtaur
Group Contributor

2368648
the scope actually does do something, though.
it refers to the parameters that you were using to find the image.

with it, anyone you share the link with will be able to browse the same search reults as you were browsing with the <, ^, and > buttons. without it, the buttons will browse the default parameters.

I usually just remove the scope stuff by hand when I'm sharing Derpibooru pages...

Selbi
Group Admin

2369047
Okay, that makes sense. Still, I don't really think that's a good reason to have obnoxious URLs.

ssokolow
Group Contributor

2381364

I have to agree there. The scope parameter should really be something like q=foo+bar&p=5 instead. That's a clearer way to encode a search query and position within the results and, for most queries, much shorter too.

My best guess is that maybe they don't understand compression and tried something similar to this without checking to make sure it actually shrunk things:

zlib.compress("q=foo+bar&i=5").encode("hex")

While the string they're using isn't just hex-encoded, zlib-compressed data, that Python code does produce a string of similar opaqueness and length.

789c2bb44dcbcfd74e4a2c52cbb4350500204d0454

(Because, for really short strings, the space you gain from compression is drowned out by the space lost to compression headers. Hence why it only makes sense when space is at such a premium that you're willing to spend the time designing a task-specific compression scheme.)

...either that or they really weren't thinking and scope is some kind of session identifier with the query parameters stored on the server. (In which case, the scope part will become useless as soon as they expire old sessions)

EDIT: Dear god, what was I thinking when I wrote this?! I look like the world's smuggest know-nothing jerk and I got my mind so tied in knots that this has little bearing on reality! I hope I was just sleep deprived. Please disregard this post. If I feel up to it when I'm of sound mind, maybe I'll try to write something better later.

Selbi
Group Admin

Updated!

Fully functional again.

Selbi
Group Admin

Updated again!

The entire UI of Derpibooru got a facelift. As a result, the Sort-By-Score button no longer worked, but even looked out of place once I made it work again.

I tried to fit it in with the new buttons:

4416001
Sort by score seems to have stopped working some time in the last day or so.

Selbi
Group Admin

5556407
All of my Derpibooru scripts broke. Looks like they completely dropped jQuery support. I could make a quick and dirty fix by manually loading the libraries necessary at render time, or completely rewrite the scripts to work with vanilla JS too.

Preferences?

EDIT:
Actually, never mind. I quickly threw in the jQuery dependency and don't notice any performance loss. This'll have to do until I find the time to do it properly.

5562957
Any chance of an update? Score seems to have broken itself again.

Selbi
Group Admin

6714424
Sorry for the late answer, I don't really check FIMFic that much anymore.

The script is fixed though:
https://greasyfork.org/de/scripts/1836-derpibooru-sort-by-score-button

Total rewrite. Instead of directly fetching the target URL for descending scores, it now simply selects the corresponding entries in the drop-down menu at the bottom of every search page and then automatically starts a search:

This is hopefully a bit more future-proof.

last i checked this script was broken. It's been fixed or remade?

6880383
Tampermonkey updated it for me earlier this week, you might want to manually run an update check on it.

  • Viewing 1 - 50 of 15